 ### Ask Dr. Math:FAQ The Two Trains  Dr. Math FAQ || Classic Problems || Formulas || Search Dr. Math || Dr. Math Home Two trains leave different cities heading toward each other at different speeds. When and where do they meet?

Train A, traveling 70 miles per hour (mph), leaves Westford heading toward Eastford, 260 miles away. At the same time Train B, traveling 60 mph, leaves Eastford heading toward Westford. When do the two trains meet? How far from each city do they meet? To solve this problem, we'll use the distance formula:

Distance = Rate x Time

Since an equation remains true as long as we perform the same operation on both sides, we can divide both sides by rate:

Distance
----------  =  Time
Rate
or by time:

Distance
----------  =  Rate
Time

So rate is defined as distance divided by time, which is a ratio.

Speed is another word that is used for rate. When a problem says that a train is moving at a speed of 40 mph, you can understand this to mean that the train's rate is 40 mph, which means it will travel 40 miles in one hour.

Here are two different ways to approach this problem. Let's start by listing the information given:

Speed of Train A: 70 mph
Speed of Train B: 60 mph
Distance between Westford and Eastford: 260 miles

Method I: We'll use the notion of relative speed 1 (or relative rate) in order to express the rates of the two trains in one number that can then be used in the distance formula.

Imagine you're on Train A. You're going 70 mph, so your speed relative to the trees, houses, and other non-moving things outside the train is 70 mph. (All of those objects look as if they're going by at 70 mph.) Now imagine you're the engineer and you can see Train B coming toward you - not on the same track, of course! Since Train B is moving 60 mph, it will look as if it's approaching faster than if it were sitting still in the station - a lot faster than the trees and houses appear to be moving.

The relative speed of the two trains is the sum of the speeds they are traveling. (If you're on either of the trains, this is the speed you appear to be moving when you see the other train.) In our problem, the relative speed of the two trains is 70 mph + 60 mph = 130 mph. What if the trains were traveling in the same direction? Then we'd need to subtract the speed of the slower train from the speed of the faster train, and their relative speed would be 10 mph.

At this point we know two of the three unknowns: rate and distance, so we can solve the problem for time. Remember that time = distance/rate, the distance traveled is 260 miles, and the relative speed is 130 mph:

t = 260 miles/130 mph
t = 2 hrs.

We find that the trains meet two hours after leaving their respective cities.

Method II: Here we'll begin by noting that the distance between Westford and Eastford is 260 miles: this is the total distance the trains will travel. Using the distance formula (Distance = rate x time, or D = rt) we can express the distance traveled by each train:

Train A moving at 70 mph in t hours will cover 70t miles
Train B moving at 60 mph in t hours will cover 60t miles

Together the two trains will cover the distance 70t + 60t Since we know that this distance is 260 miles, we can write the following algebraic equation to represent this information.

70t + 60t = 260

Solving this equation we find that:

130t = 260
t = 2

which tells us that the trains will meet in 2 hours.

Now, where do the trains meet? We again use the distance formula to find how far each train has traveled in two hours:

For Train A: 70 mph x 2 hrs = 140 miles
For Train B: 60 mph x 2 hrs = 120 miles

Thus the two trains meet at a point 140 miles from Westford and 120 miles from Eastford. To check this, we can add 140 to 120: the answer is 260, which was the given distance between the two cities.

Let's look at a variation on this problem.

Train A, traveling 40 mph, leaves Westford heading toward Eastford, 260 miles away. One hour after Train A leaves Westford, Train B, traveling 70 mph, leaves Eastford heading toward Westford. When do the two trains meet?

Notice that in this problem, the two trains do not leave their respective cities at the same time.

Method I: Let's move the starting point for Train A so we can treat the problem as if the trains leave at the same time, which we already know how to do.

We know that Train A is moving 40 mph, and will therefore travel 40 miles in the hour before Train B leaves Eastford. This means that by the time Train B starts moving, the two trains are only 260 - 40 = 220 miles apart. Now we can use the relative speed of the trains, which is 40 + 70 = 110 mph. Using the distance formula for time (time = distance/rate), we write:

t = 220 miles/110 mph
t = 2 hrs.

Since t represents the time traveled by each train after Train A has already traveled for one hour, Train B travels 2 hours before meeting Train A. Adding the extra hour that Train A travels before Train B starts moving, we see that Train A must travel 3 hours before meeting Train B.

Method II: Let t represent the time that Train A travels. Since Train B leaves one hour after Train A, let t -1 represent the time that Train B travels.

Again, the sum of the distances traveled by the two trains up until the time they meet is 260 miles: between the two of them, they cover all 260 miles of track. Using the distance formula:

distance traveled by Train A = 40t
distance traveled by Train B = 70(t -1)

40t + 70(t-1) = 260 miles
t = 3 hrs.

Since t represents the time that Train A has been traveling, this means that Train A travels 3 hours before meeting Train B. But how long has Train B been traveling? Train B travels t -1 hours, which means that it travels 2 hours before meeting Train A.

Note:
To help us make sense of relative speed and how it relates to distance traveled, let's think of it in terms of the distance the two trains travel toward each other in one hour. We'll again use the distance formula:

Rate x Time = Distance

Train A's rate is 70 mph, so: 70 mph x 1 hr = 70 miles
Train B's rate is 60 mph, so: 60 mph x 1 hr = 60 miles

If we add these two numbers together, we get 130 miles, which means that 130 miles of track will be covered in one hour. This is the same as saying that the two trains are going 130 mph relative to each other, so:

130 mph x 1 hr = 130 miles

Either way, the numbers tell you that 130 miles of track will be covered in an hour.

#### From the Dr. Math Archives

Trains, cars, bikes, boats, dolphins... using distance = rate x time:

Cycling around a Track
Dolphin Swimming
How Fast Does Bobo Run? How Many Trains Meet?
Man Crossing a Bridge
Man and Train on a Bridge Man on a Railroad Bridge
Rowing Upstream and Down
Running in Opposite Directions
Speed of Two Trains
Train B Overtakes Train A
Train Overtaking Another Train
Train and Tunnel
Trains and Fractions
Traveling by Train, then Car
Travelling Trains
Turning Word Problems into Algebra Equations
Two Trains with a Twist
Where would the Two Trains Meet? Math Forum Home || Math Library || Quick Reference || Math Forum Search Ask Dr. Math ®