a ) \(x^3-x^2-5x+125\)
\(=\left(x^3+125\right)-\left(x^2+5x\right)\)
\(=\left(x+5\right)\left(x^2-5x+25\right)-x\left(x+5\right)\)
\(=\left(x+5\right)\left(x^2-5x+25-x\right)\)
\(=\left(x+5\right)\left(x^2-6x+25\right)\)
b ) \(x^3+2x^2-6x-27\)
\(=\left(x^3-27\right)+\left(2x^2-6x\right)\)
\(=\left(x-3\right)\left(x^2+3x+9\right)+2x\left(x-3\right)\)
\(=\left(x-3\right)\left(x^2+3x+9+2x\right)\)
\(=\left(x-3\right)\left(x^2+5x+9\right)\)
a) x3 - x2 - 5x + 125
=(x3-6x2+25x)+(5x2-30x+125)
=x(x2-6x+25)+5(x2-6x+25)
=(x+5)(x2-6x+25)
b) x3 + 2x2 - 6x - 27
=x3+5x2+9-3x2-15x-27
=x(x2+5x+9)-3(x2+5x+9)
=(x-3)(x2+5x+9)