a, \(\left(x^2-9\right)^2-\left(x-3\right)\left(x+3\right)\left(x^2+9\right)=\left(x^2-9\right)^2-\left(x^2-9\right)\left(x^2+9\right)\)
\(=x^4-18x^2+81-x^4+81=-18x^2+162\)
b, \(\left(x^2+x-3\right)\left(x^2-x+3\right)=\left[x^4-\left(x-3\right)^2\right]\)
\(=x^4-x^2+6x-9\)