Two echoes at different round-trip times sort by depth only after applying the same speed model to both. With shared speed 4 m/s, the 4 s echo gives depth 8 m and the 10 s echo gives depth 20 m exactly for the stated toy ranging ledger; real ultrasound depends on sound-speed estimate, timing resolution, beam geometry, tissue variation, attenuation and scattering, and measurement uncertainty.
Echo ordering only compares depths after a shared speed is cited. Exact arithmetic here means exact results for the stated model inputs; measured inputs still carry uncertainty and significant-figure limits.
highlighted = computed this step
The earlier echo gives the shallower reflector
With shared speed 4, the 4 second echo maps to depth 8 meters.
dearly=24⋅4=8m
The later echo gives the deeper reflector
The 10 second echo maps to depth 20 meters, so it is deeper.