Well to figure this out you have to know PEMDAS
PEMDAS (follow the order)
*For the M/D A/S which ever comes first in the problem you do first.
Well parentheses are first so:(5+2=7)
Next is exponents:2^2=4
Then multiplication: 5*4=20
Then you have your answer: 20+7+12-4=35