This problem can be solved using algebra. Let's call the speed of the first train "x". Then, the speed of the second train would be x + 42.
We also know that the second train overtakes the first after 4 hours, so we can write an equation for the distance each train travels:
x * 4 = (x + 42) * 2
Expanding and solving for x, we can find that the speed of the first train is 50 mph and the speed of the second train is 92 mph.