\(x^2\left(x-5\right)+5-x=0\\ \Rightarrow\left(x-5\right)\left(x^2-1\right)=0\\ \Rightarrow\left[{}\begin{matrix}x=5\\x=-1\\x=1\end{matrix}\right.\)
\(\Leftrightarrow x^2\left(x-5\right)-\left(x-5\right)=0\)
\(\Leftrightarrow\left(x^2-1\right)\left(x-5\right)=0\)
\(\Leftrightarrow\left(x-1\right)\left(x+1\right)\left(x-5\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}x-1=0\\x+1=0\\x-5=0\end{matrix}\right.\)
\(\Leftrightarrow\left[{}\begin{matrix}x=1\\x=-1\\x=5\end{matrix}\right.\)
\(x^2\left(x-5\right)+5-x=x^2\left(x-5\right)-x+5=x^2\left(x-5\right)-\left(x-5\right)=\left(x-5\right)\left(x^2-1\right)\)