Final answer:
The speed of the slower train is 80 mph and the faster train is 90 mph. This was calculated by setting up an equation based on the total distance covered by the trains in 5 hours, which is the initial distance minus the remaining distance, and solving for the slower train's speed.
Step-by-step explanation:
To find the speeds of the two trains approaching each other, we will denote the speed of the slower train as s (in mph), and then the speed of the faster train will be s + 10 (since it's given as 10 mph greater).
Since they are moving towards each other, after 5 hours, the total distance covered by both trains will be the original distance minus the distance still between them. So combined, they cover 1020 miles - 170 miles = 850 miles in 5 hours.
Adding their speeds together gives us the speed at which the distance between them is closing, which is s + (s + 10) = 2s + 10. So in 5 hours, they cover 5 times their combined speed, 5(2s + 10) miles.
This gives us the equation 5(2s + 10) = 850. Solving for s, we distribute 5 to each term inside the parenthesis: 10s + 50 = 850. Subtracting 50 from both sides gives 10s = 800. Dividing by 10 results in s = 80 mph.
Thus, the slower train travels at 80 mph, and the faster train travels at 80 mph + 10 mph = 90 mph.