\(x^3+7x-6=\left(x^3-1\right)+\left(7x-7\right)\)
\(=\left(x-1\right)\left(x^2+x+1\right)-7\left(x-1\right)\)
\(=\left(x-1\right)\left(x^2+x-6\right)\)
\(=\left(x-1\right)\left(x^2+3x-2x-6\right)\)
\(=\left(x-1\right)\left(x+3\right)\left(x-2\right)\)