\(x^3-9x^2+6x+16=\left(x^3+x^2\right)-\left(10x^2+10x\right)+\left(16x+16\right)\)
\(=x^2.\left(x+1\right)-10x\left(x+1\right)+16\left(x+1\right)\)
\(=\left(x+1\right).\left(x^2-10x+16\right)\)
\(=\left(x+1\right).\left[\left(x^2-8x\right)-\left(2x-16\right)\right]\)
\(=\left(x+1\right)\left[x\left(x-8\right)-2\left(x-8\right)\right]\)
\(=\left(x+1\right)\left(x-2\right)\left(x-8\right)\)