For each category of problem type, John correctly answered...
- Number problems: 70% of 10 = 7
- Algebra problems: 40% of 30 = 12
- Geometry problems: 60% of 35 = 21
Total correctly answered: 7 + 12 + 21 = 40
Total problems available: 10 + 30 + 35 = 75
John got 40/75 correct. He needed to get at least 60%, and 60% of 75 = 45, so he had to answer 5 more correctly in order to pass.
- - -
In case you're not sure how to get the number of correctly answered problems: if you want to find, for example, 23% of 315, you can break up the percentage as

Finding 10% and 1% of any number is easy, just move the decimal point accordingly:
- 10% of 315 = 31.5
- 1% of 315 = 3.15
Then 23% of 315 = 2(31.5) + 3(3.15) = 72.45.