Question 974644
When traveling in opposite directions, it is as if one train is standing still and the other is moving at speed v1 + v2
When traveling in the same direction, it is as if one train is standing still and the other is traveling at speed v1 - v2
Since speed x time = distance, we can write two equations in two unknowns:
18(v1+v2) = 500 -> v2 = 500/18 - v1
15(v1-v2) = 50  -> v1 = 50/15 + v2 -> v1 = 50/15 + 500/18 - v1
Solving for v1, we get v1 = 110/9 meters per second
Converting to km/hr, we get 110/9 * 3600 sec/hr / 1000 m/km = 44 km/hr
So the other train is moving at v2 = (110/9 - 50/15)*3600/1000 = 32 km/hr