Technically this is a poorly posed question. What the variables ought to represent are the number of computation and word problems you attempt, not, as it says, the number of problems, period.
In any case, every linear programming problem has the same structure: you specify the variables; then write down a function of the variables, called the objective function, which represents the quantity you are trying to optimize (maximize or minimize); then you write down your constraints, which are usually inequalities but can also include equations; then you solve the system of constraint inequalities, which gives the "feasible region"; and finally you find the optimum value of your objective function by looking at its values on the corners of the feasible region.
The first part of the problem is done for you: they told you (if imprecisely, as I said at the beginning) what the variables are.
So the next step is to write the objective function. In your problem, you're trying to maximize the score on your test. But you get 6 points for every computation problem you get right and 10 points for every word problem. So you'd like to maximize $$6x+10y$$
That is the objective function.
Next, you write your constraints. There are two constraints in your problem: a constraint on the time you can spend (no more than 40 minutes) and a constraint on how many problems you can attempt (no more than 12).
The first constraint can be written $$2x+4y\leq40$$
because it takes you 2 minutes to attempt a computation problem and 4 minutes to attempt a word problem.
The second constraint can be written $$x+y\leq12$$