a: \(=2x^3+x^2-3x+1-x^2+10x-25-2\left(x-1\right)\left(x^2-x+1\right)-7x+14\)
\(=2x^3-10-2\left(x^3-x^2+x-x^2+x-1\right)\)
\(=2x^3-10-2\left(x^3-2x^2+2x-1\right)\)
\(=2x^3-10-2x^3+4x^2-4x+2=4x^2-4x-8\)
b: \(=\left(x^2+3x+5+1+3x-x^2\right)^2=\left(6x+6\right)^2=36x^2+72x+36\)