Hello, Intsecxtanx!

The ratio of the speeds of two trains is equal to

the ratio of the time they take to pass each other going in the same direction

to the time they take to pass each other in the opposite directions.

Find the ratio of the speeds of the two trains.

Let: .

Going in the same direction, the faster train has a relative speed of ft/sec

. . and it travels a distance of feet.

This will take: . seconds.

Going in opposite directions, the faster train has a relative speed of ft/sec

. . and it travels a distance of feet.

This will take: . seconds.

The ratio of their speeds equals the ratio of their two times:

. .

. . . .

Divide by

Quadratic Formula: .

The ratio of their speeds is: .