Answer
$\begin{bmatrix}
1 & 3 &-1\\
0 & 1 & -1
\end{bmatrix}$
Work Step by Step
We can reduce A to row-echelon form using the following sequence of elementary row operations:
$\begin{bmatrix}
5& 8 & 2\\
1& 3 & -1
\end{bmatrix} \approx^1\begin{bmatrix}
1& 3 & -1\\
5& 8 & 2
\end{bmatrix}\approx^2 \begin{bmatrix}
1& 3 & -1\\
0& -7 & 7
\end{bmatrix} \approx^3 \begin{bmatrix}
1& 3 & -1\\
0& 1& -1
\end{bmatrix}$
$1. P_{12}$
$2.A_{12}(-5)$
$3.M_2( \frac{-1}{7})$
So, elementary matrices are $M_2( \frac{-1}{7}),A_{12}(-5),P_{12}=\begin{bmatrix}
1 & 3 &-1\\
0 & 1 & -1
\end{bmatrix}$