decompose (x^2 - 9)
I don't think decompose it the word you want.
CPhill has factorised your expression.
that is, the factors of x2−9 are x−3 and x+3 so
x2−9=(x−3)(x+3)
x2−9 is the difference (take away) of two squares x squared and 3 squared
x2−9=x2−32 but it is quite the simplest form
x^2 - 9 =
(x + 3) (x - 3)