We know x questions are worth 2 points each and (30-x) questions are worth 9 points each.
2x + 9 (30-x) = 172
2x + 270 - 9x = 172
-7x + 270 = 172
-7x = -98
x = 14
30 - x = 16
There are 14 2-point questions and 16 9-point questions.
Check: (14 * 2) + (16 * 9) = 28 + 144 = 172
30 - x = 16
There are 14 2-point questions and 16 9-point questions.
Check: (14 * 2) + (16 * 9) = 28 + 144 = 172