Let's break down this into smaller problems:
It is known that the reduced row echelon form is
$$R=\begin{bmatrix} 1 & 0 \\ 0 & 1 \\ 0 & 0 \end{bmatrix}$$
Task $1$:
find a nonsingular matrix $Q$ such that $QA=R$, record down the elementary operations that you use.
Task $2$:
find a nonsingular matrix $W$ such that $WB=R$, record dow the elementary operations that you use.
Task $3$:
Since $Q$ is invertible, $QA=R$ and $WB=R$, conclude that $QA=WB$ and $A=Q^{-1}W$.
Task $4$:
Compute $P=Q^{-1}W$.
Edit:
How to find $W$ such that $WB=R$.
Let $E_1$ be the operation $4R_1+R_2$, i.e. multiply the first row by $4$ and add to row $2$. the second row become $[0, -11]$
$E_2$ be the operation $-\frac{1}{11}R_2$. The second row become $[0, 1]$
$E_3$ be the operation $3R_2+R_1$. The first row become $[1, 0]$.
$E_4$ be the operation $-6R_1+R_3$. The third row become $[0,9]$
$E_5$ be the operation $-9R_2+R_3$. The third row become $[0,0]$.
$E_5E_4E_3E_2E_1B=R$, here $W=E_5E_4E_3E_2E_1$.
Similarly $Q$ in $QA=R$ can be expressed as elementary operations, $Q=F_m \ldots F_1$.
$$Q^{-1}W=(F_m \ldots F_1)^{-1}(E_5 \ldots E_1)=F_1^{-1}\ldots F_m^{-1}E_5\ldots E_1$$
To compute $P$, it suffices to perform the operations $F_1^{-1}\ldots F_m^{-1}E_5\ldots E_1$ on the identity matrix.