For travel from Washington DC to Baltimore by car, a constant speed of 60 mph was maintained. For the return trip, there was a constant speed of 40 mph. What was the average speed over the whole two-way trip?

When the distance covered going back and forth is the same, then the:

Average speed ==Harmonic mean

[2 * 40 * 60] / [40 + 60] ==4800 / 100 ==48 mph - the average speed.