You construct a 3×3 rotation matrix from the components of the local axes as columns.
$$R = \left(
\begin{array}{c|c|c} \hat{x} & \hat{y} & \hat{z} \end{array} \right) $$
I think for your case you have
$$R = \left(
\begin{array}{c|c|c}
\cos \theta & -\sin\theta \cos\phi & \sin\theta\sin\phi \\
\sin\theta & \cos\theta \cos\phi & -\cos\theta \\
0 & \sin\phi & \cos\phi
\end{array} \right) $$
where $\phi$ is the inclination angle, and $\theta$ is the angle along the arc of track.
Usually you construct this from a sequence of rotations
$$ R = \mathrm{RotZ}(\theta)\,\mathrm{RotX}(\phi) $$
This is then used to transform vectors from local coordinates to world coordinates.
Since you are given that in world coordinates $\boldsymbol{\omega} = \pmatrix{0 \\ 0 \\ \dot{\theta}} $ (ground is along the xy plane), you can transform this to local coordinates with
$$ \boldsymbol{\omega}_{\rm local} = R^\top \boldsymbol{\omega} $$
But in the case where the tilt of the track changes, you can construct the rotational velocity vector, as a sequence of rotations
$$ \boldsymbol{\omega} = \hat{k} \dot{\theta} + \mathrm{RotZ}(\theta) \hat{\imath} \dot{\phi} = \pmatrix{ \dot{\phi} \cos\theta \\ \dot{\phi} \sin\theta \\ \dot{\theta} } $$
See also related answer post.