Here, total distance covered by the train `d = 160+160+160 = 480km`
Time taken by train for first `160` km, `t_1=160/120 = 4/3` hour
Time taken by train for second`160` km, `t_2=160/140 = 8/7` hour
Time taken by train for third `160` km, `t_3=160/80 = 2` hour
`:.` Total time taken, `t = t_1+t_2+t_3 = 4/3+8/7+2 = (28+24+42)/21 = 94/21`
`:.` Average speed of the train, `V= d/t = 480/(94/21) = 480**21/94 = 5040/47 = 107 11/47 (km)/h.`