Correct. By setting up this system of equations, you will be able to solve for t, the amount of time it will take the trains to pass each other.

Since the trains are 25 miles apart, they will meet somewhere in the middle of the two stations. If Train A travels d distance then Train B will need to travel a distance of 25 – d so that the total distance traveled for the two trains is 25 miles, the distance that stations are apart from each other.