Train problems rarely stay confined to a single moving object. Once a candidate is comfortable measuring how one train clears a stationary pole or a fixed platform, the examination shifts to a more demanding scenario: two trains occupying the same track, approaching, overtaking, or passing one another. This lesson extends the platform-crossing logic into that two-body setting, where the combined length of both trains becomes the effective distance to be covered and the relative speed between them governs the time taken. The conceptual leap is modest, but the arithmetic discipline it demands is considerable.
Competitive examinations consistently favour this topic because it rewards candidates who reason about frames of reference rather than memorising isolated formulas. When two trains move in opposite directions, their speeds add; when they travel the same way, their speeds subtract. Every subsequent calculation flows from that single insight, whether the question concerns crossing time, the length of an unknown train, or the speed of a train observed from a moving window. Mastering this distinction converts an intimidating problem type into a predictable, repeatable procedure.
The treatment below builds deliberately on the pole-and-platform work of the previous lesson and prepares the ground for boats and streams, where relative motion reappears in a fluid medium. Expect worked derivations, structured comparison tables, and exam-oriented shortcuts, each anchored to the same underlying principle of relative velocity.
On This Page
Why Two-Train Problems Demand a Different Mental Model
A single train crossing a pole involves one moving body and one fixed reference point, so the distance equals the train's own length. Introducing a second train changes the geometry entirely, because both bodies move and the gap between them closes at a rate determined by their combined or differential motion. Candidates who carry over single-train habits without adjusting the distance term almost always misjudge the answer.

The Relative Frame of Reference
The cleanest way to reason about two trains is to imagine sitting inside one of them. From that vantage point, your own train appears stationary, and the other train approaches at a speed equal to the sum or difference of the two velocities. This mental shift eliminates the need to track two separate motions and reduces every problem to the familiar single-train format.
Formally, if train A moves at ##v_A## and train B at ##v_B##, the relative speed is ##v_A + v_B## when they travel in opposite directions and ##|v_A - v_B|## when they travel the same way. The absolute value matters because the faster train must always be the one overtaking; a negative result simply signals that the assumed direction was reversed. Once the relative speed is fixed, the crossing time follows directly from the total distance divided by that speed.

Distance Equals the Sum of Both Lengths
When two trains pass each other, the moment of complete separation occurs only after every carriage of one train has cleared every carriage of the other. The total distance travelled in the relative frame is therefore the sum of the two lengths, ##L_A + L_B##, regardless of direction. This is the single most frequently forgotten element in examination settings.
Contrast this with the previous lesson, where crossing a platform required the train's length plus the platform's length. The structure is identical: the distance is always the sum of the moving body and whatever must be cleared. Recognising that pattern lets candidates transfer the platform formula directly, substituting the second train's length for the platform's length and relative speed for absolute speed.
Trains Moving in Opposite Directions
Opposite-direction problems are the more intuitive of the two cases, because the closing speed is simply the arithmetic sum of the two velocities. Candidates generally handle these well once they internalise that the trains cooperate to reduce the gap, so the crossing happens faster than either train would manage alone. The formula is compact and reliable.
Deriving the Crossing Time Formula
Let train A have length ##L_A## and speed ##v_A##, and train B have length ##L_B## and speed ##v_B##, travelling towards each other. In the frame of train A, train B approaches at ##v_A + v_B## and must cover a distance of ##L_A + L_B## before the two are fully clear of one another. Dividing distance by relative speed gives the crossing time.

The elegance of this expression lies in its symmetry: swapping the two trains changes nothing, which is exactly what physical intuition predicts. When speeds are given in kilometres per hour but lengths in metres, convert the speeds by multiplying by ##\frac{5}{18}## so that the units align with metres per second before substitution.
A Worked Examination Example
Consider two trains of lengths 180 metres and 120 metres travelling towards each other at 54 km/h and 36 km/h respectively. The combined length is 300 metres, and the combined speed is 90 km/h, which converts to 25 m/s. Dividing 300 by 25 yields a crossing time of 12 seconds, a clean result typical of well-designed examination questions.

Notice how the conversion step protects the answer. Had the candidate divided 300 by 90 directly, the result would have been meaningless. Unit discipline is not pedantry here; it is the difference between a correct option and a plausible distractor. Practise the ##\frac{5}{18}## conversion until it becomes automatic, and verify that the final unit is seconds.
Trains Moving in the Same Direction
Same-direction problems invert the logic: the trains no longer cooperate but compete, and only the excess speed of the faster train closes the gap. The crossing time therefore lengthens considerably, and candidates who instinctively add the speeds will select a distractor that looks superficially reasonable. Careful reading of the direction cue is essential.
The Subtraction Rule and Its Interpretation
When train A overtakes train B, the relative speed is ##v_A - v_B##, assuming A is faster. The distance to be covered remains ##L_A + L_B##, because the faster train must still clear the entire length of the slower one before separation is complete. The crossing time is therefore larger than in the opposite-direction case by a wide margin.

A useful sanity check: if the two speeds were equal, the denominator would vanish and the crossing would never complete, which matches reality since the trains would maintain a constant gap. Any computed time that seems implausibly large usually signals a subtraction performed in the wrong order or a unit mismatch between the two speeds.
Worked Example with Overtaking
Suppose a 200-metre train travelling at 72 km/h overtakes a 150-metre train moving at 36 km/h in the same direction. The combined length is 350 metres and the relative speed is 36 km/h, or 10 m/s. The crossing time is therefore 35 seconds, substantially longer than the opposite-direction equivalent would have been.

This asymmetry is worth internalising because examiners exploit it. A question may present identical lengths and speeds but reverse the direction, expecting the candidate to notice that the answer changes dramatically. Reading the phrase "in the same direction" or "overtakes" carefully is as important as the arithmetic itself.
Solving for Unknown Lengths and Speeds
Examiners rarely supply every quantity directly. More often, the crossing time is given alongside one train's length and both speeds, and the candidate must recover the second train's length. Alternatively, the lengths and crossing times in both directions may be provided, allowing the two speeds to be extracted by solving a pair of simultaneous equations.
Recovering an Unknown Length
Rearranging the crossing formula is straightforward: multiply the crossing time by the relative speed to obtain the combined length, then subtract the known length. If two trains cross in 10 seconds at a relative speed of 30 m/s, the combined length is 300 metres; if one train measures 170 metres, the other must measure 130 metres.
The same rearrangement works for same-direction problems, provided the correct relative speed is used. Candidates should always write the formula down before substituting numbers, because the act of writing forces an explicit choice between addition and subtraction and prevents the most common error in this topic.
Simultaneous Equations from Two Scenarios
A classic examination construction gives the crossing time in opposite directions and the crossing time in the same direction for the same pair of trains. Let the combined length be ##S## and the two speeds be ##v_A## and ##v_B##. Then ##S = t_1(v_A + v_B)## and ##S = t_2(v_A - v_B)##, two equations in two unknowns once ##S## is eliminated.
Dividing one equation by the other isolates the ratio of the speeds, and back-substitution recovers each individually. This technique appears frequently in higher-tier papers and rewards candidates who are comfortable manipulating algebraic expressions rather than relying on numerical substitution alone.
Unit Conversions and Common Traps
The mathematics of two-train problems is elementary, yet the error rate in examinations remains stubbornly high. Almost every mistake traces back to a unit inconsistency, a misread direction cue, or an assumption that the crossing distance equals a single train's length. Addressing these traps explicitly is more valuable than rehearsing further formulas.
Speed Conversion Discipline
Speeds arrive in kilometres per hour while lengths arrive in metres, so conversion is unavoidable. Multiplying by ##\frac{5}{18}## converts km/h to m/s, and multiplying by ##\frac{18}{5}## reverses the operation. Candidates should convert both speeds before combining them, never after, because adding two unconverted speeds and then converting invites arithmetic slips.
A quick mental check helps: 36 km/h is exactly 10 m/s, 54 km/h is 15 m/s, and 72 km/h is 20 m/s. These three benchmarks cover the overwhelming majority of examination values, and recognising them on sight saves precious seconds during timed papers.
Direction Cues and Distractor Design
Examiners deliberately construct options that correspond to the wrong direction assumption. If the correct answer is 12 seconds, a distractor of 60 seconds will almost certainly appear, derived from subtracting rather than adding the speeds. Candidates who compute both values and then select the one matching the stated direction eliminate this risk entirely.
Another frequent trap involves a train passing a stationary observer seated inside the other train. In that case the distance is only the length of the moving train, not the sum of both, because the observer occupies a single point. Reading whether the question concerns the whole train or a passenger within it is decisive.
From Trains to Streams: Preparing for the Next Lesson
The relative-motion reasoning developed here transfers almost unchanged to the next lesson on boats and streams. There, a boat moves through water that is itself moving, and the effective speed is again a sum or difference depending on whether the boat travels with or against the current. The structural parallel is exact and worth noting explicitly.
The Shared Relative-Motion Framework
In train problems, the two velocities are those of the trains; in stream problems, they are the boat's speed in still water and the current's speed. Downstream motion corresponds to opposite-direction trains, where speeds add, while upstream motion corresponds to same-direction trains, where speeds subtract. Recognising this correspondence halves the learning burden.
Candidates who grasp the framework rather than memorising separate formulas find that both topics collapse into a single idea: effective speed equals the vector sum of the two velocities, and time equals distance divided by that effective speed. The next lesson simply changes the physical setting while preserving the mathematics intact.
Consolidation Through Practice
Before advancing, work through problems that combine both directions in a single question, and problems where one train's length must be recovered from the crossing time. These composite exercises expose gaps that isolated drills conceal. A short quiz follows this lesson to reinforce the distinction between the two cases.
Accuracy matters more than speed during consolidation. Once the direction cue is read correctly and the unit conversion is automatic, pace follows naturally. Candidates preparing for quantitative aptitude sections should aim to solve a standard two-train problem in under forty seconds, which is comfortably achievable with disciplined practice.
Exam-Focused Problem-Solving Techniques
Timed examinations reward candidates who recognise problem types instantly and apply a rehearsed procedure. The two-train topic is particularly amenable to this approach because the underlying formula never changes; only the given quantities and the direction cue vary. A short decision sequence handles every variant.
A Four-Step Decision Sequence
First, identify the direction: opposite means add, same means subtract. Second, convert all speeds to metres per second. Third, compute the distance as the sum of both lengths, unless a point observer is specified. Fourth, divide distance by relative speed and verify the result is plausible.
This sequence can be encoded as a small routine for candidates who prefer to check their work programmatically. The snippet below accepts lengths in metres and speeds in km/h, performs the conversion, and returns the crossing time in seconds for either direction.
def crossing_time(length_a, length_b, speed_a_kmh, speed_b_kmh, same_direction=False):
# Convert speeds from km/h to m/s
speed_a = speed_a_kmh * 5 / 18
speed_b = speed_b_kmh * 5 / 18
# Relative speed depends on direction of travel
if same_direction:
relative_speed = abs(speed_a - speed_b)
else:
relative_speed = speed_a + speed_b
if relative_speed == 0:
return None # Trains never separate
total_distance = length_a + length_b
return total_distance / relative_speed
# Opposite directions: 180 m and 120 m at 54 and 36 km/h
print(crossing_time(180, 120, 54, 36)) # 12.0 seconds
# Same direction: 200 m and 150 m at 72 and 36 km/h
print(crossing_time(200, 150, 72, 36, True)) # 35.0 seconds
Time-Saving Shortcuts for Objective Papers
When both speeds are multiples of 18, the conversion to m/s yields whole numbers, and the arithmetic can be done mentally. Recognising that 18 km/h equals 5 m/s, 36 km/h equals 10 m/s, and 54 km/h equals 15 m/s allows candidates to bypass the fraction entirely and save several seconds per question.
Another shortcut applies when the two lengths are in a simple ratio and the speeds are also in a simple ratio. In such cases the crossing time can be computed as a proportion without ever evaluating the individual quantities, a technique that experienced candidates deploy to gain time on lengthy papers.
Also Read
- No links available.
From our network :
- Bitcoin price analysis: Market signals after a muted weekend
- Bitcoin Hits $100K: Crypto News Digest
- JD Vance Charlie Kirk: Tribute and Political Strategy
- How to design postgres partitions with native and hash methods
- How to migrate to postgres using logical replication and cutover
- Limit Superior and Inferior
- How to secure postgres connections across VPC, VPN, and cloud
- Limits: The Squeeze Theorem Explained
- The Diverse Types of Convergence in Mathematics
RESOURCES
- No results found.