

Let the distance be S for first half distance
Let time taken to cover the distance S be t
Hence t= distance / average speed
t = S/40 hr
Similarly time taken to travel second half t1 = S/60 hr
Average speed = (Total distance) /(total time)——-eq(1)
Total distance = S + S = 2S
Total time = t + t1 = (S/40) + (S/60)
Substituting the values of total distance and total time in equation(1) we get
Average speed = 2S / [ (6S + 4S)/ 240 ] = 48 km/h
