Which reference frame decides the relative velocity of two reference frames? The following thought experiment is often used to introduce Special Relativity:

The thought experiment fails to specify which reference frame establishes $\vec{v}$--the observer on earth or the observer in the boxcar.
Determining what $\vec{v}$ should be ( and according to whom ) becomes less trivial in the following example, where there are more than two reference frames and no $\vec{v}$ is given:

An alien spaceship traveling at 0.620 c toward the Earth launches a landing craft. The landing craft travels in the same direction with a speed of 0.790 c relative to the mother ship (as measured by aliens on the mother ship). As measured on the Earth, the spaceship is 0.220 ly from the Earth when the landing craft is launched.
What speed do the Earth-based observers measure for the approaching landing craft?

Solving for $\vec{u}$ according to observers on earth, we use the Lorentz Velocity Transform:
$
\LARGE{ u_x^{'} = \frac{u_x - v}{1 - \frac{vu_x}{c^2}} = 0.946\ c }
$
and we use -0.550 c ( the velocity of earth approaching the mothership as observed by aliens on the mothership )--but why? Because the mothership said so, of course.
But, the mothership is traveling at relativistic speeds, so their clocks are subject to time dilation, time is a component of velocity and therefore, one would think, observations of velocity made by the mothership are skewed by time dilation, and the contraction of space.
Suppose we wanted to answer the following question:

What speed do the Earth-based observers measure for the approaching mothership?

How do we determine $\vec{v}$ then?
 A: It is assumed in the box car example that the observer O on the ground is stationary (meaning the box car is moving past her at a speed $v$), and the observer in the box car is traveling with the boxcar's speed of $v$, and would therefore believe herself to be stationary and the observer outside the box car to be moving backwards with speed $v$ (i.e. velocity = $-v$). 
From the outside observers reference frame, the lightning strikes the front and the back of the car simultaneously, and because they are both an equal distance away, and the light from each of the events is traveling at the same speed ($c$), so they will reach the observer O at the same time: $$t = \frac{|B-O|}{c} = \frac{|A-O|}{c}$$
From the reference frame of the observer in the boxcar (O') who is travelling at speed $v$ relative to the ground (or, if you like, for whom the ground appears to be moving backwards at a speed $v$), the light from the from the front of the bus has less distance to travel, as distances in the direction of motion are length contracted. The length to the front of the car is now: $$ L = |B-O'|\sqrt{ \left(1-\frac{v^2}{c^2} \right)} < |B-O'| , $$ because, at the moment of impact, the lightning strike appears to be moving toward the observer at speed v. So, since light travels at the same speed regardless of reference frame, the lightning from the front will reach observer O' before it otherwise would if the car was stationary.
As for the aliens and their landing craft: here we have to use the velocity addition formula for special relativity: $$ s = \frac{u+v}{1+\frac{vu}{c^2}} .$$ u is the velocity of the mothership as soon by an Earth observer, v is the velocity of the landing craft as seen by the mothership, and s is the speed seen by Earth (we are assuming we are in the reference frame of the earth). We assume that the velocities of both the mothership and landing craft are negative, because they are moving toward earth (moving away from Earth would be positive). It says that the spaceship is traveling at $u=-0.620 c$ as measured on Earth, and the landing craft is travelling at $u=-0.790$ as measured by the mothership (though both are still negative, as we defined (+) and (-) from the p.o.v. of Earth), so Earth measures the landing craft at: $$ s = \frac{(-0.620-0.790)c}{1+\frac{(-0.620)(-0.790)c^2}{c^2}} = -0.946c $$
As for why $s$, $u$, and $v$ are defined in the way they are, that goes back to the derivation of these equations, which I hope you're book contains, at the very least in the appendices.
