# transformation matrix between two different basis

I am working on this problem:-

A rectangular coordinates $(x,y,z)$ are given in terms of new coordinates $(q_1,q_2,q_3)$ by :-

$x=q_1 +q_2 \cos(\theta)$ , $y=q_2 \sin(\theta)$ and $z=q_3$.

where $\theta$ is a constant and in the range, $0<\theta<\dfrac{\pi}{2}$. I need to find the transformation matrix from the $(\hat{q_1},\hat{q_2},\hat{q_3})$ basis to the $(\hat{x},\hat{y},\hat{z})$ basis. also I want to know what this $\theta$ represent when I draw the diagram of the coordinate system.

I only been able to find $A$ where $X=AQ$ and stuck from there.

Transformation matrix: $$\left(\begin{matrix}1 & \cos(\theta) & 0 \\ 0 & \sin(\theta) & 0 \\ 0 &0 & 1\end{matrix}\right)$$ from $(x,y,z)$ to $(q_1,q_2,q_3)$.
$$\left( \begin{array}{ccc} 1 & -\cot(\theta) & 0 \\ 0 & \csc(\theta) & 0 \\ 0 & 0 & 1 \\ \end{array} \right).$$