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,
[tex]\begin{gathered} \text{Distance}=\text{Speed}\times Time \\ D=(x+15)\times6\ldots\ldots\ldots.(1) \end{gathered}[/tex]The distance traveled by the first train due west in 8 hours is,
[tex]\begin{gathered} D=x\times8 \\ D=8x\ldots\ldots..(2) \end{gathered}[/tex]Since the distance between the two trains is 580km.
So, we write
[tex]\begin{gathered} 8x+(x+15)6=580 \\ 8x+6x+90=580 \\ 14x=490 \\ x=35 \end{gathered}[/tex]So, the answers are,
The speed of the first train is 35 kmph.
The speed of the second train is (35+15)= 50 kmph.