a ) \(\left(x^2+x\right)^2+3\left(x^2+x\right)+2\)
\(=\left(x^2+x\right)^2+2\left(x^2+x\right)\dfrac{3}{2}+\left(\dfrac{3}{2}\right)^2-\left(\dfrac{1}{2}\right)^2\)
\(=\left(x^2+x+\dfrac{3}{2}\right)^2-\left(\dfrac{1}{2}\right)^2\)
\(=\left(x^2+x+\dfrac{3}{2}-\dfrac{1}{2}\right)\left(x^2+x+\dfrac{3}{2}+\dfrac{1}{2}\right)\)
\(=\left(x^2+x+1\right)\left(x^2+x+2\right)\)
b ) \(x\left(x+1\right)\left(x+2\right)\left(x+3\right)+1\)
\(=x\left(x+3\right)\left(x+1\right)\left(x+2\right)+1\)
\(=\left(x^2+3x\right)\left(x^2+2x+x+2\right)+1\)
\(=\left(x^2+3x\right)\left(x^2+3x+2\right)+1\)
\(=\left(x^2+3x+1-1\right)\left(x^2+3x+1+1\right)+1\)
\(=\left(x^2+3x+1\right)^2-1^2+1\)
\(=\left(x^2+3x+1\right)^2\)