Two of the fired rounds are heard by person B; the first is straight from the gun, while the second is reflected from the cliff.
Given a sound speed of 320 m/s
The time it takes for sound to travel from point A to point B
Distance divided by time equals speed.
(y – x) / 2 = 320
320 2 = (y – x)
640 = (y – x)
After a moment of contemplation on the cliff,
(y + x) / 3 = 320
3203 = (y + 3)
960 = (y + 3)
By combining equations
y = 1600 / 2
y = 800 m
x=160 m