In such types of questions where two trains start towards each other and cross each other to reach their respective destinations, there is a relation between the speed and time of the two trains (trains A and B in this case), i.e.,
Speed of train A
Speed of train B
=√
Time taken by Train B
Time taken by Train A
Thus,Let the speed of Train A = SA and time taken by Train A =5
1
7
h Speed of Train B = 54 km/h and time taken by Train B =9