Use Pythagoras' theorem to relate the positions of the two particles.