a) \(\left(x^2-x+2\right)^2+\left(x-2\right)^2\)
\(=x^4+x^2+4-2x^3-4x+4x^2+x^2-4x+4\)
\(=x^4-2x^3+6x^2-8x+8\)
\(=x^4-2x^3+2x^2+4x^2-8x+8\)
\(=x^2\left(x^2-2x+2\right)+4\left(x^2-2x+2\right)\)
\(=\left(x^2+4\right)\left(x^2-2x+2\right)\)
b) \(6x^5+15x^4+20x^3+15x^2+6x+1\)
\(=6x^5+3x^4+12x^4+6x^3+14x^3+7x^2+8x^2+4x+2x+1\)
\(=3x^4\left(2x+1\right)+6x^3\left(2x+1\right)+7x^2\left(2x+1\right)+4x\left(2x+1\right)+2x+1\)
\(=\left(2x+1\right)\left(4x^4+6x^3+7x^2+4x+1\right)\)
\(=\left(2x+1\right)\left(3x^4+3x^3+3x^2+3x^3+3x^2+3x+x^2+x+1\right)\)
\(=\left(2x+1\right)\left[\left(3x^2\right)\left(x^2+x+1\right)+3x\left(x^2+x+1\right)+\left(x^2+x+1\right)\right]\)
\(=\left(2x+1\right)\left(x^2+x+1\right)\left(3x^2+3x+1\right)\)