I don't think this problem has enough information to come up with an equation. A passenger train leaves a train station traveling west at 130 km/hr. Three hours later, a freight train leaves the same station, traveling west at 160 km/hr. How many hours will each train travel before the second train catches up with the first?
Draw a vertical line representing the Distance axis, D, and a horizontaal line representing the Time axis, T.
From the origin, draw a line upward to the right representing the passenger trains movement and having a slope of 390/3 = 130 km/h. The equation of this line is D = 130T.
From the point T = +3 on the time axis, draw another line upward to the right representing the freight trains movement and having a slope of 160 km/h. Extending this line back to the D axis, we find that the D intercept of the trains movement is 3(160) = - 480.The equation of the trains movement is D = 160T - 480.
You now have the graphic representation of both trains movement.
Dp = 130T
Df = 160T - 480
Since Dp = Dt when they meet, I leave it for you to complete.