\[x^{3} + 5x^{2} - x + 1 - \left( 1 - x^{2} \right) =\]
\[= x^{3} + 5x^{2} - x + 1 - 1 + x^{2} =\]
\[= x^{3} + 6x^{2} - x.\]