# A Roller Coaster Ride through Relativity/Appendix D

Consider a spaceship A of length lA travelling past you at a speed vA passing a second spaceship B of length lB travelling in the opposite direction at a speed vB (both speeds measured with reference to you). The question we need to answer is what speed vX does B appear to be going past the astronauts in A?

We need to consider two vital events; first contact, when the nose cones of the two spaceships meet and second contact when the two tails part.

Two rockets passing each other

What is more, let us suppose that these two events occur at the same place from your point of view. This means that the spaceships have to be just the right length so that they both pass you in the same time. Note that from your point of view, both ships are contracted by the factors γA and γB respectively.

Now what does the commander of ship A see? He sees you travelling past at a speed vA and also ship B travelling past at some greater speed vX.

Note that to the occupants of ship A, B is length contracted by a factor γX.

Now commander A can calculate the time between first and second contact in two ways. First he sees you travelling a distance lA at a speed vA. Secondly, he sees ship B (whose length is contracted to lB/γX) travel a distance equal to lA + lB/γX at a speed vX. It follows that:

${\displaystyle {l_{A} \over v_{A}}={l_{A}+l_{B}/\gamma _{X} \over v_{X}}}$
${\displaystyle l_{A}v_{X}=l_{A}v_{A}+l_{B}v_{Z}/\gamma _{X}}$
${\displaystyle l_{A}(v_{X}-v_{A})=l_{A}v_{B}/\gamma _{X}}$

An identical argument from commander B's point of view leads to:

${\displaystyle l_{B}(v_{X}-v_{B})=l_{B}v_{A}/\gamma _{X}}$

(It should be pointed out that because of the invariance of velocity, if commander A sees ship B moving at a speed vX then commander B will see ship A moving at exactly the same speed and contracted by the same γ factor.)

Now multiplying the two equations together eliminates the lengths of the two ships and leaves us with a relation between the three velocities. The rest is just algebra.

${\displaystyle (v_{X}-v_{A})(v_{X}-v_{B})=v_{A}v_{B}/\gamma _{X}^{2}}$

Now

${\displaystyle \gamma _{X}={1 \over {\sqrt {1-v^{2}/c^{2}}}}}$

so:

${\displaystyle 1/\gamma _{X}^{2}=1-v_{X}^{2}/c^{2}=(c^{2}-v_{X}^{2})/c^{2}}$

hence:

${\displaystyle (v_{X}-v_{A})(v_{X}-v_{B})=v_{A}v_{B}(c^{2}-v_{X}^{2})/c^{2}}$

from which we obtain by straightforward algebra the result we desire:

${\displaystyle v_{x}={v_{A}+v_{B} \over 1+v_{A}v_{B}/c^{2}}}$