---
title: "Speeds of Two Trains From Same-Direction and Opposite-Direction Passing Times"
organization: "NityaDhi Digital Mathematics Lab (Asa Edtech Private Limited)"
url: "https://www.nityadhi.com/problems/hard-c8-w1-var-two-trains-relative-speed"
board: "CBSE"
grade: "Class 8"
published_at: "2026-12-01T15:00:00+05:30"
---

# Speeds of Two Trains From Same-Direction and Opposite-Direction Passing Times

Two trains of lengths $180\text{ m}$ and $220\text{ m}$ run on parallel tracks at constant speeds. When moving in the same direction, the faster train completely overtakes the slower train in $40\text{ seconds}$. When moving in opposite directions, they completely cross each other in $8\text{ seconds}$.

Find the speed of each train in $\text{km/h}$.

## Textbook Solution

**Step 1: Find the total distance covered during crossing.**
In both cases, total distance $= 180 + 220 = 400\text{ m}$.

**Step 2: Set up equations for relative speeds $v_1$ (faster) and $v_2$ (slower) in $\text{m/s}$.**
- Same direction: $v_1 - v_2 = \frac{400}{40} = 10\text{ m/s}$
- Opposite direction: $v_1 + v_2 = \frac{400}{8} = 50\text{ m/s}$

**Step 3: Solve for $v_1$ and $v_2$.**
Adding the two equations:
$$2v_1 = 60 \implies v_1 = 30\text{ m/s}$$
$$v_2 = 50 - 30 = 20\text{ m/s}$$

**Step 4: Convert from $\text{m/s}$ to $\text{km/h}$ (multiply by $\frac{18}{5}$).**
$$v_1 = 30 \times \frac{18}{5} = 108\text{ km/h}$$
$$v_2 = 20 \times \frac{18}{5} = 72\text{ km/h}$$

## Vedic Shortcut

**Sum-and-Difference Direct Speed Shortcut:**
Once you have total length $L = 400\text{ m}$, remember:
- Faster speed $= \frac{1}{2}\left(\frac{400}{8} + \frac{400}{40}\right) = \frac{50 + 10}{2} = 30\text{ m/s} = 108\text{ km/h}$
- Slower speed $= \frac{50 - 10}{2} = 20\text{ m/s} = 72\text{ km/h}$
(Remember $10\text{ m/s} = 36\text{ km/h}$, so $30\text{ m/s} = 3 \times 36 = 108\text{ km/h}$ and $20\text{ m/s} = 2 \times 36 = 72\text{ km/h}$.)

## Common Mistakes

- **Using only one train's length:** Taking distance as $180\text{ m}$ or $220\text{ m}$ instead of $180 + 220 = 400\text{ m}$.
- **Multiplying by $\frac{5}{18}$ instead of $\frac{18}{5}$:** Confusing $\text{km/h} \to \text{m/s}$ with $\text{m/s} \to \text{km/h}$.