A train goes from boston to new york averaging 40 km per hour and returns averaging 60 km per hour. What is the average speed(it is not 50 km per hour) for the round trip?

time for 1st trip = x/40, where x is the distance between NY and Boston

time for return trip = x/60
total time = x/40 + x/60 = (60x + 40x)/2400
= 100x/2400 = x/24

so average rate = 2x/(x/24)
=2x ( 24/x)
= 48