1. \(a\left(b+c\right)^2+b\left(c+a\right)^2+c\left(a+b\right)^2-4abc\)
\(=\left(ab+ac\right)\left(b+c\right)+bc^2+2abc+a^2b+a^2c+2abc+b^2c-4abc\)
\(=\left(ab+ac\right)\left(b+c\right)+\left(bc^2+b^2c\right)+\left(a^2b+a^2c\right)\)
\(=\left(ab+ac\right)\left(b+c\right)+bc\left(b+c\right)+a^2\left(b+c\right)\)
\(=\left(ab+ac+bc+a^2\right)\left(b+c\right)\)
\(=\left[\left(ab+bc\right)+\left(ac+a^2\right)\right]\left(b+c\right)\)
\(=\left[b\left(a+c\right)+a\left(a+c\right)\right]\left(b+c\right)\)
\(=\left(a+b\right)\left(a+c\right)\left(b+c\right)\)
2. Đặt \(x^2+x+1=a\) \(\Rightarrow\left(x^2+x+1\right)\left(x^2+x+2\right)-12=a\left(a+1\right)-12\)
\(=a^2+a-12=\left(a^2-3a\right)+\left(4a-12\right)\)
\(=a\left(a-3\right)+4\left(a-3\right)=\left(a+4\right)\left(a-3\right)\)
\(=\left(x^2+x+1+4\right)\left(x^2+x+1-3\right)=\left(x^2+x+5\right)\left(x^2+x-2\right)\)