so both functions are same when x!=3
yes, I agree, but this thing should be mentioned. You changed the original function to a new function without defined it.
It should be :
$\lim_{x\rightarrow 3} \frac{(x-3)(x+3)(x^2 + 9)}{(2x+1)(x-3)}$
$= \lim_{x\rightarrow 3} \frac{(x+3)(x^2 + 9)}{(2x+1)}$ , when $x \neq 3$
This is a very small thing but most important and can be found in any book.