A train travels from one station to another at a speed of 40km/h and returns to the first station at a speed of 60 km/h. Calculate the average velocity

Baloney

Lets say the distance is 120 km each way
then time outbound = 120 / 40 = 3 hr
and time back = 120 / 60 = 2 hr
so we went 240 km in 5 hr = 240 / 5 = 48 km / hr

Average velocity = (40 km/h + 60 km/h) / 2 = 50 km/h