Party A and Party B set out in the same direction. Party A bicycles and Party B walks. If Party B walks 12 km first, Party A will catch up with Party B in 1 hour; if Party B walks 1 hour first, Party A will surpass Party B in 0.5 hour

Party A and Party B set out in the same direction. Party A bicycles and Party B walks. If Party B walks 12 km first, Party A will catch up with Party B in 1 hour; if Party B walks 1 hour first, Party A will surpass Party B in 0.5 hour

If the speed of B is XKM / h, the speed of a is (x + 12) km / h
5 (x + 12) = 1.5x
So x = 6, x + 12 = 18
So the speed of a is 18 km / h, and that of B is 6 km / h