Here's my code for your problem.
A=500
B=700
C = A+B
PRINT "A = 500"
PRINT "B = 700"
PRINT "A + B = C"
PRINT "What is C?"
INPUT "My answer is: ",answer
DO
IF answer = C
PRINT "Right Answer!"
WAIT KEY
END
ELSE
PRINT "Wrong Answer, try again"
INPUT "My answer is: ",answer
ENDIF
LOOP
I believe it's your IF/ENDIF block that is giving you problems. One thing I did different was set another variable C to be the sum of A and B so I can test my answer that was entered.
Since we are only testing againest one value but want it to loop with the player given the option to answer again until he gets it right you will want an Else to go along with that.
So your IF/ELSE block will look something like this.
With the above you could write a program like this to generate random values.
A=RND(500)+1
B=RND(700)+1
IF A = 501 then A = A - 1
IF B = 701 then B = B - 1
C = A + B
PRINT "A = ",A
PRINT "B = ",B
PRINT "A + B = C"
PRINT "What is C?"
INPUT "My answer is: ",answer
DO
IF answer = C
PRINT "Right Answer!"
WAIT KEY
END
ELSE
PRINT "Wrong Answer, try again"
INPUT "My answer is: ",answer
ENDIF
LOOP
I am Batman!