Why can't Math books just use the term "speed" like everyone else? "rate*time = distance." "rate" of what, I ask you???
Pet Peeve over.
Okay. Let's assume that the passenger train starts from the left and the freight train starts from the right. For the record I am going to set an origin at the starting position of the passenger train and set the +x direction to be to the right.
The passenger train will move with a speed and cover a distance x miles. The freight train will move with a speed and covers a distance 405 - x miles. They meet at the same time, t = 3 hours.
So for the passenger train:
and for the freight train:
Put the first equation into the second:
and now insert the 3rd equation into the equation we just got:
Now we can solve for :