Setting up our coordinate systems so that you can go from one the next or previous in the chain via a simple rotation simplifies deriving the kinematics.
Simple rotations have easy to write matrix representations. For each of the 3 axes of a coordinate system, a simple rotation about one of its 3 axis can be written:
\[
\mathbf R_1 = \begin{bmatrix}
1 & 0 & 0 \
0 & \cos \theta & \sin \theta \
0 & \sin \theta & \cos \theta \
\end{bmatrix}
\]
Is a rotation about the \(1\) axis by angle \(\theta\). And:
\[
\mathbf R_2 = \begin{bmatrix}
\cos \theta & 0 & \sin \theta \
0 & 1 & 0 \
\sin \theta & 0 & \cos \theta \
\end{bmatrix}
\]
Is a rotation about the \(2\) axis by angle \(\theta\). And finally,
\[
\mathbf R_3 = \begin{bmatrix}
\cos \theta & \sin \theta & 0 \
\sin \theta & \cos \theta & 0 \
0 & 0 & 1 \
\end{bmatrix}
\]
Is a rotation about the \(3\) axis by angle \(\theta\). As a for instance, say I want to take the vector:
\[
\mathbf v = \begin{bmatrix}
1 \
0 \
0 \
\end{bmatrix}
\]
And rotate it about the \(3\) axis by \(\frac{\pi}{4}\), the rotation matrix is:
\[
\mathbf R_3(\frac{\pi}{4}) = \begin{bmatrix}
\frac{\sqrt 2}{2} & \frac{\sqrt 2}{2} & 0 \
\frac{\sqrt 2}{2} & \frac{\sqrt 2}{2} & 0 \
0 & 0 & 1 \
\end{bmatrix}
\]
Then to rotate the vector \(\mathbf v\) you premultiply it by the rotation matrix and get:
\[
\mathbf R_3(\frac{\pi}{4}) \mathbf v = \begin{bmatrix}
\frac{\sqrt 2}{2} & \frac{\sqrt 2}{2} & 0 \
\frac{\sqrt 2}{2} & \frac{\sqrt 2}{2} & 0 \
0 & 0 & 1 \
\end{bmatrix}
\begin{bmatrix}
1 \
0 \
0 \
\end{bmatrix}
=
\begin{bmatrix}
\frac{\sqrt 2}{2} \
\frac{\sqrt 2}{2} \
0 \
\end{bmatrix}
\]
If you draw these vectors out on paper, you’ll see it works out and makes sense.
An important note to make is that I keep using the notion of vector rotation to as a synonym for a coordinate frame tranformation. That’s because they are the same thing, just what you think of as changing is different. A coordinate transformation keeps the vector the same but represents it in a new coordinate system, while a rotation keeps the coordinate system the same while rotating the vector and representing it as a new rotated vector in the same coordinate system.
Anyway with that established, we can hash out all of the rotation matricies needed to transform a vector from the \(\hat c_i\) frame to the inertial frame. In the following, the notation of \(\mathbf R_{bc}\) represents a rotation matrix that transforms a vector in the \(\hat c_i\) frame into the \(\hat b_i\) frame. Ie, if you have a vector \(\mathbf v_b\) in the \(\hat b_i\) frame, then it can be written in the inertial frame by doing:
\[ \mathbf v_e = \mathbf R_{el} \mathbf R_{la} \mathbf R_{ab} \mathbf v_b \]
Also, since rotations are orthonormal, the following is true:
\[ \mathbf R_{ab} = \mathbf R_{ba}^T \]
A few important notes:

in this case we are not rotating the vector, but instead are tranforming it to a different coordinate system. The equality \(\mathbf v_e == \mathbf v_b \) is true  it is the same vector, just with component representations in different coordinate systems.

These rotations are not translations. In fact, vectors don’t have a notion of where they are located. We typically write vectors with their bases at some origin, but that same vector translated anywhere is still the same vector. So the transformation above of \(\mathbf v_b\) to \(\mathbf v_e\) doesn’t translate the vector or change the vector at all, it is just a different way of representing the same exact vector.
So, finally, all of our simple rotations are:
\[
\mathbf R_{el} = \begin{bmatrix}
1 & 0 & 0 \
0 & \cos 0 & \sin 0 \
0 & \sin 0 & \cos 0 \
\end{bmatrix}
= \begin{bmatrix}
1 & 0 & 0 \
0 & 1 & 0 \
0 & 0 & 1 \
\end{bmatrix}
\]
\[
\mathbf R_{la} = \begin{bmatrix}
1 & 0 & 0 \
0 & \cos \theta_l & \sin \theta_l \
0 & \sin \theta_l & \cos \theta_l \
\end{bmatrix}
=
\begin{bmatrix}
1 & 0 & 0 \
0 & \cos \theta_l & \sin \theta_l \
0 & \sin \theta_l & \cos \theta_l \
\end{bmatrix}
\]
\[
\mathbf R_{am} = \begin{bmatrix}
1 & 0 & 0 \
0 & \cos \theta_m & \sin \theta_m \
0 & \sin \theta_m & \cos \theta_m \
\end{bmatrix}
=
\begin{bmatrix}
1 & 0 & 0 \
0 & \cos \theta_m & \sin \theta_m \
0 & \sin \theta_m & \cos \theta_m \
\end{bmatrix}
\]
\[
\mathbf R_{ab} = \begin{bmatrix}
\cos \theta_h & \sin \theta_h & 0 \
\sin \theta_h & \cos \theta_h & 0 \
0 & 0 & 1 \
\end{bmatrix}
=
\begin{bmatrix}
\cos \theta_h & \sin \theta_h & 0 \
\sin \theta_h & \cos \theta_h & 0 \
0 & 0 & 1 \
\end{bmatrix}
\]
\[
\mathbf R_{bc} = \begin{bmatrix}
\cos \theta_s & 0 & \sin \theta_s \
0 & 1 & 0 \
\sin \theta_s & 0 & \cos \theta_s \
\end{bmatrix}
=
\begin{bmatrix}
\cos \theta_s & 0 & \sin \theta_s \
0 & 1 & 0 \
\sin \theta_s & 0 & \cos \theta_s \
\end{bmatrix}
\]