Decomposing $SO_3$ 
(Artin Algebra, 9.4.9)Let $H_i$ be the subgroup of $SO_3$ of rotations about the $x_i$-axis, $i=1,2,3$. Prove that every element of $SO_3$ can be written as a product $ABA'$, where $A$ and $A'$ are in $H_1$ and $B$ is in $H_2$. Prove that this representations is unique unless $B=I$.


I know that $A$ and $B$ generate $SO_3$, but I cannot show that we can do it in the way $ABA'$. I think $A'$ here denotes the transpose of $A$ and since $A$ is orthogonal, then $A'=A^{-1}$. So it seems like we can somehow "change of basis" but I am lack of geometric intuition to visualize how to do this. Can someone help me with this? Thank you!

for  $ A \in H_1$ it has the form
$$
\begin{matrix}
1 & 0 & 0 \\ 
0 & c_\theta & s_\theta \\
0 & -s_\theta & c_\theta \\ 
\end{matrix}
$$
For any $ G \in SO_3 $ :
$$
\begin{matrix}
g_{11} & g_{12} & g_{13} \\
g_{21} & g_{22} & g_{23} \\
g_{31} & g_{32} & g_{33} \\  
\end{matrix}
$$
Assume that G is not in $H_1$ otherwise G = AIA for some $\theta$, so that g11 is not equal to 1.
We can found $A_1$ and $A_2$ in $H_1$ to rotate $g_{21} = g_{12} = 0$
$B = A_1GA_2$
$$
\begin{matrix}
g'_{11} & 0 & g'_{13} \\
0 & g'_{22} & g'_{23} \\
g'_{31} & g'_{32} & g'_{33} \\  
\end{matrix}
$$
As $g'_{11} \neq 1$ so $g'_{13} \neq 0$ and $g'_{31} \neq 0$
Use the fact that $B \in SO_3$ $BB^T = I$ we can see $g'_{32} = 0, g'_{22} = 1 ,g'_{23} = 0$
This show $B \in H_2$
So that $G = A_1^{-1}BA_2^{-1} $ where $A_1^{-1}, A_2^{-1} \in H_1$ as well.
For unique, assume $G = A_1BA_2 = A'_1B'A'_2$ so
${A'}_1^{-1}A_1B = B'A'_2A_2^{-1}$ this show B = I.
