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