\(n^2+5n+9⋮n+3\Rightarrow n.n+3n+2n+9⋮n+3\)
\(\Rightarrow n\left(n+3\right)+2n+9⋮n+3\)
Vì \(n\left(n+3\right)⋮n+3\Rightarrow2n+9⋮n+3\)
Mà : \(n+3⋮n+3\Rightarrow2\left(n+3\right)⋮n+3\Rightarrow2n+6⋮n+3\)
\(\Rightarrow\left(2n+9\right)-\left(2n+6\right)⋮n+3\)
\(\Rightarrow2n+9-2n-6⋮n+3\Rightarrow3⋮n+3\)
\(\Rightarrow n+3\in\left\{\pm1;\pm3\right\}\Rightarrow n\in\left\{-2;-4;0;-6\right\}\)
Vậy \(n\in\left\{-2;-4;0;-6\right\}\)