Alternatively, you could treat this as a WEIGHTED AVERAGE problem.
If one class had 40% walk-to-schoolers and the other had 80%, the weighted average of both classes must be between 40 and 80. Eliminate A.
If we had an equal number of students in each class, we'd end up exactly halfway between 40 and 80: 60%. Since we have more students in class B, though, the average must be weighted toward 80% rather than 40%. That means the weighted average will be greater than 60. Eliminate B and C.
At this point, you could probably reason that since 45 is not that much greater than 35, the right answer shouldn't be that much greater than 60%. An answer of 75% would be very heavily weighted toward 80% - that's what we'd get if we had many times more students in class B than class A. So you should feel comfortable picking D as the only reasonable answer.
If you want to prove the answer mathematically (though I don't recommend that you take the time to do so on test day), you can do so as follows:
The ratio of 35 to 45 can be reduced to 7 to 9. So, we're looking for an answer that is 9/16 of the distance from 40 to 80:
$$\frac{9}{16}=\frac{x}{40}$$
$$\frac{9\cdot40}{16}=x$$
$$\frac{9\cdot5}{2}=x$$
$$\frac{45}{2}=x$$
$$22.5=x$$
$$40+22.5=62.5$$
Again, I definitely don't recommend doing this math! It's unnecessarily messy. It would be enough to realize that 9/16 is going to be just a little over the halfway point, so we want an answer that's just a little over 60%.
The answer is D.
Ceilidh Erickson
EdM in Mind, Brain, and Education
Harvard Graduate School of Education