Step 1: Write second polynomial below the first one. Making sure like terms are lined up.
$$ \begin{array}{lrrrrr} & -x^5 & 12x^3 & 6x^2 & -23x & 1 \\ \color{red}{ - } & & & & x & -2 \\ \hline \end{array} $$Step 2: Change ALL the signs in the second row.
$$ \begin{array}{lrrrrr} & -x^5 & 12x^3 & 6x^2 & -23x & 1 \\ \color{red}{ - } & & & & -x & 2 \\ \hline \end{array} $$Step 3: Combine like terms (add each column):
$$ \begin{array}{lrrrrr} & -x^5 & 12x^3 & 6x^2 & -23x & 1 \\ \color{red}{ - } & & & & -x & 2 \\ \hline & -x^5 & 12x^3 & 6x^2 & -22x & -1 \end{array} $$