The speed of the first train is 45 mph and the speed of the second train is 75 mph
Step-by-step explanation:
Let x represent the speed of the first train in mph. Since the second train, is 30 mph faster then the first, therefore the speed of the second train is (x + 30).
The first train leaves at 1:00 pm, therefore at 6:00 pm, the time taken is 5 hours. Therefore the distance covered by the first train at 6:00 pm = x mph * 5 hours = 5x miles
The second train leaves at 3:00 pm, therefore at 6:00 pm, the time taken is 3 hours. Therefore the distance covered by the second train at 6:00 pm = (x + 30) mph * 3 hours = (3x + 90) miles
Since the second train overtakes the first at 6:00 pm, hence:
3x + 90 = 5x
2x = 90
x = 45
Therefore the speed of the first train is 45 mph and the speed of the second train is 75 mph (45 mph + 30 mph).