Problem #47 MEDIUM

The Train Tunnel Escape

Meta Netflix Geometry Logic

Problem Statement

A hiker is walking through a straight train tunnel. She has reached exactly one-quarter of the way through the tunnel when she hears a train approaching from behind her (from the tunnel entrance). The train travels at 60 km/h. She realises that if she runs toward the train (back toward the entrance), she will just barely escape — reaching the entrance exactly as the train arrives. She also realises that if she runs in the other direction (toward the far exit), she will also just barely escape — reaching the far end exactly as the train arrives. How fast can the hiker run?

Answer & Quick Explanation

Think you've got it? Click below to check your answer.

The hiker runs at 30 km/h — exactly half the train's speed. The two simultaneous equations (from both escape scenarios) give v = 30 km/h regardless of the tunnel's actual length, which cancels out of the calculation.

Detailed Editorial Solution

Want to see the step-by-step breakdown? Click below to reveal the editorial.

Define variables: let L = tunnel length, v = hiker's speed (km/h), d = distance of train from tunnel entrance when hiker first hears it. Use the two 'just barely escapes' conditions to write two equations. Step 1: Hiker is at L/4 inside the tunnel. Train is d away from the entrance, approaching at 60 km/h. Step 2: Scenario 1 — Run toward entrance: Hiker runs L/4 at speed v. Time taken = (L/4) / v. Train travels d in this time: d = 60 x (L/4) / v. Step 3: Scenario 2 — Run toward exit: Hiker runs 3L/4 at speed v. Time taken = (3L/4) / v. Train travels d + L (reaches and passes through to where hiker exits) in this time: d + L = 60 x (3L/4) / v. Step 4: Subtract equation 1 from equation 2: L = 60 x (3L/4)/v − 60 x (L/4)/v = 60 x (2L/4)/v = 60 x L / (2v). Step 5: Simplify: L = 60L / (2v). Cancel L from both sides: 1 = 60 / (2v). Solve: 2v = 60, so v = 30? Let me recheck: 60 x (2L/4)/v = 60 x L/(2v). Set equal to L: 60L/(2v) = L → 60/(2v) = 1 → v = 30. Hmm — re-examine scenario 2: train must travel d + L. Eqn2 − Eqn1: L = 60 x (3L-L)/(4v) = 60 x 2L/(4v) = 30L/v. So 1 = 30/v, giving v = 30 km/h. But let us verify: if v=30, time for run-back = (L/4)/30 = L/120. Train travels 60 x L/120 = L/2 = d. Time for run-forward = (3L/4)/30 = 3L/120 = L/40. Train travels 60 x L/40 = 3L/2. But train needs to travel d + L = L/2 + L = 3L/2. Yes — 3L/2 = 3L/2. Confirmed: v = 30 km/h. Step 6: The hiker runs at 30 km/h — half the speed of the train. Key Insight: The two 'just barely' conditions create two simultaneous equations with two unknowns (v and d). The clever part is that L cancels out — you do not need to know the tunnel length to find the hiker's speed. The ratio of distances (1/4 vs 3/4) does all the work.