Since the trains are moving in the same direction, use relative speed.
Total distance to be covered
170+480=650 m
Relative speed
80−70=10 km/h
Convert to m/s:
10×185=925 m/s
Time taken
Time=25/9650
=650×259
=234 seconds
Convert seconds to minutes:
60234=3.9 minutes
So, the required time is:
3.9 minutes