\(x^2\left(x-3\right)^2-\left(x-3\right)^2-x^2+1=\left(x-3\right)^2\left(x^2-1\right)-\left(x^2-1\right)=\left(x^2-1\right)\left[\left(x-3\right)^2-1\right]=\left(x-1\right)\left(x+1\right)\left(x-4\right)\left(x-2\right)\)
\(x^2\left(x-3\right)^2-\left(x-3\right)^2-x^2+1\)
\(=\left(x-3\right)^2\cdot\left(x-1\right)\left(x+1\right)-\left(x-1\right)\left(x+1\right)\)
\(=\left(x-1\right)\cdot\left(x+1\right)\left(x-2\right)\left(x-4\right)\)