\(\dfrac{x}{x^2-9}+\dfrac{2}{x^2+6x+9}=\dfrac{x\left(x+3\right)+2\left(x-3\right)}{\left(x-3\right)\left(x+3\right)^2}\\ =\dfrac{x^2+5x-6}{\left(x-3\right)\left(x+3\right)^2}=\dfrac{\left(x-1\right)\left(x+6\right)}{\left(x-3\right)\left(x+3\right)^2}\)