\(x^2-9=\left(x-3\right)\left(x+3\right)\)
\(\left(\dfrac{21+\left(x-4\right)\left(x+3\right)-\left(x-1\right)\left(x-3\right)}{x^2-9}\right):\left(1-\dfrac{1}{x+3}\right)=\left(\dfrac{3\left(x+2\right)}{x^2-9}\right):\left(\dfrac{x+2}{x+3}\right)=\left(x-3\right)\)