a: \(2\left(x+1\right)\left(x-1\right)+\left(x+3\right)^2-\left(2x+5\right)^2+x\left(x-8\right)\)
\(=2\left(x^2-1\right)+x^2+6x+9-4x^2-20x-25+x^2-8x\)
\(=2x^2-2-2x^2-22x-16\)
=-22x-18
b: \(\left(x+4\right)^3-3\left(3-2x\right)^2+6\left(x+7\right)\)
\(=x^3+12x^2+48x+64-3\left(4x^2-12x+9\right)+6x+42\)
\(=x^3+12x^2+54x+106-12x^2+36x-27\)
\(=x^3+90x+79\)