\(\left(x^2+x\right)^2+4x^2+4x-12=\left[\left(x^2+x\right)^2+4\left(x^2+x\right)+4\right]-16=\left(x^2+x+2\right)-4^2=\left(x^2+x+2-4\right)\left(x^2+x+2+4\right)=\left(x^2+x-2\right)\left(x^2+x+6\right)=\left(x-1\right)\left(x+2\right)\left(x^2+x+6\right)\)
\(\left(x^2+x\right)^2+4x^2+4x-12\\ =\left(x^2+x+2\right)-4\\ =\left(x^2+x-2\right)\left(x^2+x+6\right)\)
\(\left(x^2+x\right)^2+4x^2+4x-12\)
\(=\left(x^2+x+6\right)\left(x^2+x-2\right)\)
\(=\left(x^2+x+6\right)\left(x+2\right)\left(x-1\right)\)