\(\left(x-3\right)⋮x^2+9\\ =>\left(x-3\right)\left(x+3\right)⋮x^2+9\\ =>x^2-9⋮x^2+9\\ ->x^2+9-18⋮x^2+9\\ =>18⋮x^2+9\)
=>\(x^2+9\in\text{Ư}\left(18\right)=\left\{1;2;3;6;9;18;-1;-2;-3;-6;-9;-18\right\}\)
\(=>x^2\in\left\{-8;-7;-6;-3;0;9;-10;-11;-12;-15;-18;-27\right\}\)
\(=>x\in\left\{0;\pm3\right\}\)