Let's use the following variables to represent the speed of each train:
Let x be the speed of the freight train in miles per hour (mph).
Since the passenger train is 10 mph faster, its speed is x + 10 mph.
We know that the time it takes for each train to travel their respective distances is the same, so we can set up the following equation:
310 / (x + 10) = 260 / x
To solve for x, we can cross-multiply and simplify:
310x = 260(x + 10)
310x = 260x + 2600
50x = 2600
x = 52
Therefore, the speed of the freight train is 52 mph. To find the speed of the passenger train, we can plug in x = 52 and add 10:
x + 10 = 52 + 10 = 62
So the speed of the passenger train is 62 mph.