If A and B persons are moving with VA and VB velocities in opposite directions. Magnitude of relative velocity of B w.r.t. A is x and magnitude of relative velocity of A w.r.t B is y. Then
Suppose A is moving along positive x axis, so B must be moving along negative x-axis
and