relative velocity
Relative velocity
The relative velocity of an object B relative to an observer A is the velocity vector of B measured in the rest frame of A.
Difference between velocity
Velocity is the absolute measure of the object's speed and direction in relation to a fixed point, like the Earth's surface. It's value depends on the frame of reference from which it is observed and has no absolute "true" or "correct" value.
Relative velocity, on the other hand, considers the motion of two objects relative to each other.
For instance, if we're in a car moving at 60 kmph and another car passes by moving at 70 kmph, that car's relative velocity with respect to us is only 10 kmph in the direction that we are moving. That's because from our perspective the other car is only moving 10 kmph faster than us.
One-dimension

Take the example of the person sitting in a train moving east. If we choose east as the positive direction and Earth as the reference frame, then we can write the velocity of the train with respect to the Earth as \[\vec{v}_{\text{TE}}=10\,\text{ms$^{-1}\,\hat{\imath}$}\], where the subscript TE refers to the train and Earth. Now, the person stands up and walks towards the back of the train at 2 meters per second, i.e. he would have a velocity of -2 meters per second with respect to the train, \[\vec{v}_{\text{PT}}=-2\,\text{ms$^{-1}$}\, \hat{\imath}\].
We can then add the two velocity vectors to find the velocity of the person with respect to Earth, i.e. \[\vec{v}_{\text{PE}}=\vec{v}_{\text{PT}}+\vec{v}_{TE}=8\,\text{ms$^{-1}$}\,\hat{\imath}\].
Then, we conclude that the person's relative velocity to the train is -2 meters per second, and his relative velocity to Earth is 8 meters per second.
Two-dimensions
A two-dimensional illustration of relative position based on two reference frames \[S\] and \[S^{\prime}\]:

The position vectors are related by \[\vec{r}_{j}=\vec{r^{\prime}}_{j}+\vec{R}\] where \[\vec{R}\] is the vector from the origin of reference frame \[S\] to the origin of reference frame \[S^{\prime}\]. The relative velocity between the two reference frames, i.e. how fast the origin of one reference frame is moving with respect to the other, is then given by \[\vec{V}=\frac{d\vec{R}}{dt}\]. In simple words, when we stand in frame \[S\], we see frame \[S^{\prime}\] moving with velocity \[\vec{V}\]; if we're standing in frame \[S^{\prime}\], we see frame \[S\] moving with velocity \[-\vec{V}\].
Suppose the \[j\]-th particle is moving, naturally the observers in the different reference frames will measure different velocities. Differentiating the equation \[\vec{r}_{j}=\vec{r^{\prime}}_{j}+\vec{R}\], we get the relation of the velocities of the particle in different frames as \[\vec{v}_{j}=\vec{v^{\prime}}_{j}+\vec{V}\].
Assume the relative acceleration between the two reference frames is zero, i.e. \[\vec{A}=\frac{d\vec{V}}{dt}=0\], then both reference frames are known as relative inertial reference frames. This will come in important later on.

Now consider two particles of masses \[m_{1}\] and \[m_{2}\], we pick a coordinate system in which the position vector of the first body is denoted by \[\vec{r}_{1}\] and the second as \[\vec{r}_{2}\]. The relative position of body 1 with respect with body 2 is then \[\vec{r}_{1,2}=\vec{r}_{1}-\vec{r}_{2}\]. During the course of interaction, each body is displaced by \[d\vec{r}_{1}\] and \[d\vec{r}_{2}\] respective, which makes the relative displacement \[d\vec{r}_{1,2}=d\vec{r}_{1}+d\vec{r}_{2}\]. The relative velocity between the particles is then given as \[\vec{v}_{1,2}=\vec{v}_{1}+\vec{v}_{2}\].
What happens when we're observing the relative velocities of two particles from two difference reference frames? The answer is, the relative velocity stays the same as long as the two reference frames are relatively inertial.
Mathematically, the relative velocity observed from frame \[S\] is \[\vec{v}_{1,2}=\vec{v}_{1}-\vec{v}_{2}\] and when observed from frame \[S^{\prime}\] is \[\vec{v^{\prime}}_{1,2}=\vec{v^{\prime}}_{1}-\vec{v^{\prime}}_{2}\]. We've also defined the relation where \[\vec{v}_{j}=\vec{v^{\prime}}_{j}+\vec{V}\] where \[j=1,2\]. Therefore, \[\vec{v}_{1,2}=\vec{v}_{1}-\vec{v}_{2}=(\vec{v^{\prime}}_{1}+\vec{V})-(\vec{v^{\prime}}_{2}+\vec{V})=\vec{v^{\prime}}_{1}-\vec{v^{\prime}}_{2}=\vec{v^{\prime}}_{1,2}\].
Three-dimensions and more

We can extend the idea into additional dimensions. Consider a particle \[P\] and two frames of reference, \[S\] and \[S^{\prime}\]. The position of the origin of \[S^{\prime}\] measured from the origin of \[S\] is \[\vec{r}_{S^{\prime}S}\], \[P\] measured from \[S\] is \[\vec{r}_{PS}\] and \[P\] measured from \[S^{\prime}\] is \[\vec{r}_{PS^{\prime}}\].
From the figure above we can say that \[\vec{r}_{PS}=\vec{r}_{PS^{\prime}}+\vec{r}_{SS^{\prime}}\], and since relative velocities are the time derivatives of the position vectors, \[\vec{v}_{PS}=\vec{v}_{PS^{\prime}}+\vec{v}_{SS^{\prime}}\].