To find the answers, you basically have to use trial and error. I'm not sure how else to find them.
Anyways, grouping up "6+12" as one group and "2^2-2+1" as the other leads to

-----------------------------
For the next problem, you'll need 2 sets of parenthesis, but this time one set of parenthesis is inside another one. The (6+12) becomes 18, which divides by 2 to get 9. Squaring that leads to 81 and then you subtract off 1 to get 80.
