For each category of problem type, John correctly answered...
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
[tex]23\%=2\cdot10\%+3\cdot1\%[/tex]
Finding 10% and 1% of any number is easy, just move the decimal point accordingly:
Then 23% of 315 = 2(31.5) + 3(3.15) = 72.45.