a) Ta có : \(3n+2⋮n-1\)
\(\Rightarrow\left(3n-3\right)+5⋮n-1\)
\(\Rightarrow3\left(n-1\right)+5⋮n-1\)
\(\Rightarrow5⋮n-1\)
\(\Rightarrow n-1\in\left\{-1;1;-5;5\right\}\)
\(\Rightarrow\left\{{}\begin{matrix}n-1=-1\Rightarrow n=0\\n-1=1\Rightarrow n=2\\n-1=-5\Rightarrow n=-4\\n-1=5\Rightarrow n=6\end{matrix}\right.\)
Vậy n=0 hoặc n=2 hoặc n=-4 hoặc n=6
b) Ta có: \(n^2+2n+7⋮n+2\)
\(\Rightarrow n\left(n+2\right)+7⋮n+2\)
\(\Rightarrow7⋮n+2\)
\(\Rightarrow n+2\in\left\{-1;1;-7;7\right\}\)
\(\Rightarrow\left\{{}\begin{matrix}n+2=-1\Rightarrow n=-3\\n+2=1\Rightarrow n=-1\\n+2=-7\Rightarrow n=-9\\n+2=7\Rightarrow n=5\end{matrix}\right.\)
Vậy n=-3 hoặc n=-1 hoặc n=-9 hoặc n=5