This is a blended fuel rate, a weighted average where the weight is gallons consumed, not miles driven. The trip-wide miles per gallon equals total miles divided by total gallons, so the two leg-rates must be combined by gallons, not by the more visible mileage figures.
Let the highway distance be x miles, so the city distance is 2x miles. Highway gallons = x/50, and city gallons = 2x/v, where v is the city rate. The whole-trip average is (x + 2x) divided by (x/50 + 2x/v) = 30. The x cancels, leaving 3 ÷ (1/50 + 2/v) = 30, so 1/50 + 2/v = 1/10. Then 2/v = 1/10 − 1/50 = 5/50 − 1/50 = 4/50 = 2/25, giving v = 25. Sanity check: 50 highway miles use 1 gallon, 100 city miles use 4 gallons, so 150 miles on 5 gallons is 30 miles per gallon. So the answer is C.
Among the traps: A averages the two rates directly, (50 + v)/2 = 30, but rates do not combine by a plain average when the legs differ. B is the dominant trap, weighting the rates by the 1-to-2 miles ratio, (1×50 + 2×v)/3 = 30, or treating that mileage ratio as a fuel ratio; in reality more city miles at a lower rate means city gallons dominate, pulling the weight far past a mileage split. D restates the overall trip average 30 as the city rate. E keeps the correct total of 5 gallons over 150 miles but wrongly splits the fuel evenly (2.5 gallons per leg), when the lower-rate city leg actually consumes 4 of the 5 gallons.