All motion requires a frame of reference, an origin from which to make measurements of displacement, and thus velocity, and so on. In many cases, you can take the origin as fixed and make all measurements from that origin. but what happens, if you are on a plane, or a train, or in car? Below is a video made to demonstrate what happens when you compare measurements in fixed and moving reference frames.
We need a way to describe measurements in frames that are moving relative to each other. Consider the example of the truck and the pitching machine in the video above. The truck moves to the left with a speed of 100km/hr while the baseball is fired from the truck to the right with a speed of 100km/hr. In the frame of the camera, which is on the ground, the baseball appears to have no horizontal velocity. 1)
In the diagram below, the truck appears at the instant the baseball leaves the pitching machine.
There are three velocities that we are interested in:
They are related through vector addition: $\vec{v}_{B/G} = \vec{v}_{B/T} + \vec{v}_{T/G} =$ $\langle -100,0 \rangle $ km/hr + $\langle 100,0 \rangle $ km/hr = $\langle 0,0 \rangle$ km/hr. This demonstrates that the velocity of the baseball with respect to the ground is zero (as observed in the video). So, in general, the velocity of A with respect to C is the vector sum of the velocity of A with respect to B and the velocity of B with respect to C. Mathematically, we represent that vector sum like this:
$$\vec{v}_{A/C} = \vec{v}_{A/B} + \vec{v}_{B/C}$$