The trains take 57.4 s to pass each other.
Two trains A and B move towards each other. Let A move along the positive x axis and B along the negative x axis.
therefore,
![v_A=90 km/h\\ v_B=-80 km/h](https://img.qammunity.org/2019/formulas/physics/high-school/wxyf5t9mnioskqma8zgsw8edoqwuiojijo.png)
The relative velocity of the train A with respect to B is given by,
![v_A_B=v_A-v_B\\ =(90km/h)-(-80km/h)\\ =170km/h](https://img.qammunity.org/2019/formulas/physics/high-school/tpstpk40c6tj0ua1ihpj7mkmt9sgsg0no1.png)
If the train B is assumed to be at rest, the train A would appear to move towards it with a speed of 170 km/h.
The trains are a distance d = 2.71 km apart.
Since speed is the distance traveled per unit time, the time taken by the trains to cross each other is given by,
![t= (d)/(v_A_B)](https://img.qammunity.org/2019/formulas/physics/high-school/hm8wcse7e0px9jesjcso6oqi6x95p7unk9.png)
Substitute 2.71 km for d and 170 km/h for
![v_A_B](https://img.qammunity.org/2019/formulas/physics/high-school/oyrj27l1f0n4iw6plkodij52gr2e96nbd2.png)
![t= (d)/(v_A_B)\\ =(2.71 km)/(170 km/h) \\ =0.01594 h](https://img.qammunity.org/2019/formulas/physics/high-school/udd9m2m6q2m0md6ffg334vr51f4cq7mh9j.png)
Express the time in seconds.
![t=(0.01594h)(3600s/h)=57.39s](https://img.qammunity.org/2019/formulas/physics/high-school/h5gr7cao2lco6cq57j7n5iw86b6r2ninfh.png)
Thus, the trains cross each other in 57.4 s.