\(A=x^2-16-6x-2x^2+x^2+6x+9=-7\\ B=\left(x^2+4\right)\left(x^2-4\right)-x^4+9\\ B=x^4-16-x^4+9=-7\)
a) \(A=\left(x+4\right)\left(x-4\right)-2x\left(3+x\right)+\left(x+3\right)^2\)
\(=x^2-16-2x^2-6x+x^2+6x+9=-7\)
b) \(B=\left(x^2+4\right)\left(x+2\right)\left(x-2\right)-\left(x^2+3\right)\left(x^2-3\right)\)
\(=\left(x^2+4\right)\left(x^2-4\right)-\left(x^4-9\right)\)
\(=x^4-16-x^4+9=-7\)