a) \(x^3+3x^2-5x+1=\left(x^3-1\right)+\left(3x^2-3x\right)-\left(2x-2\right)=\left(x-1\right)\left(x^2+x+1\right)+3x\left(x-1\right)-2\left(x-1\right)=\left(x-1\right)\left(x^2+4x-1\right)\)
b: \(=x^3+x^2-6x^2-6x+8x+8\)
\(=\left(x+1\right)\left(x^2-6x+8\right)\)
\(=\left(x+1\right)\left(x-2\right)\left(x-4\right)\)
c: \(=x^3+x^2-6x^2-6x+9x+9\)
\(=\left(x+1\right)\left(x^2-6x+9\right)\)
\(=\left(x+1\right)\left(x-3\right)^2\)