The relative velocity formula is expressed as
\begin{array}{l}\vec{V}=\vec{V_{AB}}+\vec{V_{BC}}\end{array}
Where
VAB is the velocity with respect to A and B, VBC is the velocity with respect to B and C and VAC is the velocity with respect to A and C.