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