The first step is
\(-3R_1+R_3 \to R_3\text{,}\) which has the corresponding elementary matrix
\begin{equation*}
E_1 = \begin{bmatrix}
1 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \\
-3 \amp 0 \amp 1
\end{bmatrix}
\end{equation*}
And the product
\(E_1A\) is
\begin{equation*}
E_1 A = \begin{bmatrix}
1 \amp 2 \amp 0 \\
0 \amp -2 \amp 2 \\
0 \amp -6 \amp 1
\end{bmatrix}
\end{equation*}
Next, the step
\(-3R_2 + R_3 \to R_3\) which correspond to the elementary matrix
\begin{equation*}
E_2 =\begin{bmatrix}
1 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \\
0 \amp -3 \amp 1
\end{bmatrix}
\end{equation*}
And now the product of the elementary matrices and
\(A\) is
\begin{equation*}
E_2 E_1 A = \begin{bmatrix}
1 \amp 0 \amp 2 \\
0 \amp -2 \amp 2 \\
0 \amp 0 \amp -5
\end{bmatrix}
\end{equation*}
And since this matrix is an upper triangular matrix, we stop here. The matrix on the right hand side is
\(B\) and the matrix
\(U\) is
\begin{equation*}
U = E_2 E_1 = \begin{bmatrix}
1 \amp 0 \amp 0 \\
0 \amp 1 \amp 0 \\
-3 \amp -3 \amp 1
\end{bmatrix}
\end{equation*}