Given:
A west-facing train is traveling at a speed of x kmph.
An east-facing train is traveling at a speed x+15 kmph.
To find the speed of the first and second trains:
A west-facing train is traveling at a speed x kmph for 2 hours.
After 2 hours,
A second train, heading east, leaves the same station and travels 15 km/h faster than the first.
And it is given that, they are 580 km apart, 6 hours after the second train departed.
So, the distance traveled by the second train is,
The distance traveled by the first train due west in 8 hours is,
Since the distance between the two trains is 580km.
So, we write
So, the answers are,
The speed of the first train is 35 kmph.
The speed of the second train is (35+15)= 50 kmph.