If in a race of 160 m, P covers the distance in 40 seconds and Q in 50 seconds, then P beats Q by:
32m
The difference in the timing of P and Q is 10 seconds. Hence, P beats Q by 10 seconds.
The distance covered by Q in 10 seconds = 160×1050 = 32m
Hence, A beats B by 32m.