The answer is B. What we are looking for here is a
weighted average: we need to take into account both of the averages (which we have), and the relative size of each group (which we don't).
1) doesn't give us this - the total number of students gives us no info about the relative die of each group.
2) does - if x is 3 times the size of y, then we will give it 3 times the weight. This is all we need! Answer B.
(Just to show the calculation: the weighted average = (40*3+30)/4 = 150/4=37.5.)
_________________