Solution (source code)

= Solution

Write $(t,x)$ for coordinates in the rest frame of $A_0$ and $(t',x')$ for those in the rest frame of $A_1$. The <Lorentz transformation> is $x'=\gamma_1(x-v_1t)$ and $t'=\gamma_1(t-v_1x/c^2)$. Along the worldline of $A_2$, $x'=v_2t'$. Cancelling $\gamma_1$ gives $x-v_1t=v_2(t-v_1x/c^2)$, so the <relativistic velocity-addition formula> yields
$$
\boxed{v_{02}=\frac{v_1+v_2}{1+v_1v_2/c^2}.}
$$
Apply the same <Lorentz transformation> between the rest frames of $A_0$ and $A_2$ to $A_3$. Its velocity in the former is $(v_{02}+v_3)/(1+v_{02}v_3/c^2)$. Substitution simplifies to
$$
\boxed{v_{03}=\frac{v_1+v_2+v_3+v_1v_2v_3/c^2}{1+(v_1v_2+v_1v_3+v_2v_3)/c^2}.}
$$
Here $|v_i|<c$ and the formulas use signed collinear velocities. In the given positive-direction setting they are positive speeds. The limit $c\to\infty$ recovers ordinary addition, providing a check on both expressions.