You must have the distances mixed up when you typed it because it does not work out equation-wise the way you have it. The distance comes out negative, and distance NEVER should come out negative. If you switch the distances traveled you get that the passenger train is going 60 and the freight train is going 40, which makes sense because if the passenger train is going 60 and the freight train is going 40 which is the 20 mph difference we were told exists between the 2 trains.