\[\frac{x^{3} + 2x^{2} - 9x - 18}{(x - 3)(x + 2)} =\]
\[= \frac{x^{2}(x + 2) - 9(x + 2)}{(x - 3)(x + 2)} =\]
\[= \frac{(x + 2)\left( x^{2} - 9 \right)}{(x - 3)(x + 2)} =\]
\[= \frac{(x - 3)(x + 3)}{x - 3} = x + 3.\]