First define a referential : for instance O as origin, x axis = (OP) with P abscissa = 22, y axis = (OQ) with Q ordinate = -14, and time=0 when the particles start. Then P(22,0) and Q(0,-14).
The first particle speed is
Same method for the second particle.
Then the distance