Where y is the the total distance and x is the time traveled, for the first train:
y = 60x + 60 (It got a 60 mile head start, we can say)
For the second train:
y = 80 x + 0
Set the two equations equal to eachother:
60x + 60 = 80x
Subtract 60x from both sides
60 = 20 x
Divide by 20 on both sides
x = 3 so three hours after the second train departs or four from when the first train departed.