The components of the velocity of object A are
v_(Ax) = (-2"m")/(3 "s") = -0.667 "m"/"s"vAx=−2m3s=−0.667ms
v_(Ay) = (2"m")/(3 "s") = 0.667 "m"/"s"vAy=2m3s=0.667ms
and object B
v_(Bx) = (7"m")/(3 "s") = 2.33 "m"/"s"vBx=7m3s=2.33ms
v_(By) = (-5 "m")/(3"s") = -1.67 "m"/"s"vBy=−5m3s=−1.67ms
We're trying to find the velocity of object B with respect to object A. We'll call this velocity v_(B"/"A)vB/A, the velocity of object B with respect to the origin v_(B"/"O)vB/O, and the velocity of object A relative to the origin v_(A"/"O)vA/O.
The equation for relative velocity, using these frames of reference, is
vec v_(A"/"O) = vec v_(A"/"B) + vec v_(B"/"O)→vA/O=→vA/B+→vB/O
And remembering that vec v_(A"/"B) = -vec v_(B"/"A)→vA/B=−→vB/A, this equation becomes
vec v_(A"/"O) = vec v_(B"/"O) - vec v_(B"/"A)→vA/O=→vB/O−→vB/A
Since we're solving for vec v_(B"/"A)→vB/A,
vec v_(B"/"A) = vec v_(B"/"O) - vec v_(A"/"O)→vB/A=→vB/O−→vA/O
Or, in terms of components,
v_(Bx"/"Ax) = v_(Bx"/"O) - v_(Ax"/"O)vBx/Ax=vBx/O−vAx/O
v_(By"/"Ay) = v_(By"/"O) - v_(Ay"/"O)vBy/Ay=vBy/O−vAy/O
Now, let's plug in our known velocity components:
v_(Bx"/"Ax) = 2.33"m"/"s" - -0.667"m"/"s" = 3.00 "m"/"s"vBx/Ax=2.33ms−−0.667ms=3.00ms
v_(By"/"Ay) = -1.67"m"/"s" - 0.667 "m"/"s" = -2.33 "m"/"s"vBy/Ay=−1.67ms−0.667ms=−2.33ms
Thus, the magnitude of the velocity of object B with respect to object A is
v_(B"/"A) = sqrt((3.00"m"/"s")^2 + (-2.33"m"/"s")^2) = color(red)(3.80 "m"/"s"vB/A=√(3.00ms)2+(−2.33ms)2=3.80ms
And the direction of the velocity of object B with respect to object A is
phi = arctan ((-2.33"m"/"s")/(3.00 "m"/"s")) = color(blue)(-37.9^oϕ=arctan(−2.33ms3.00ms)=−37.9o
There are technically two directions that satisfy this, each opposite to each other in a coordinate plane (the other angle is thus 142^o142o). We have to choose the one that points from object A to object B, which if you were to plot their coordinates, would indeed be -37.9^o−37.9o.
The direction is more easily found in this case, as we also could have just found the inverse tangent of the differences in the yy-positions over the difference in the xx-position of the two objects:
phi = arctan ((2"m"--5"m")/(-2"m"-7"m")) = -37.9^oϕ=arctan(2m−−5m−2m−7m)=−37.9o