a) \(\left(n-7\right)⋮\left(n+2\right)\)\(\Rightarrow n+2-9⋮n+2\)mà \(n+2⋮n+2\)\(\Rightarrow9⋮n+2\Rightarrow n+2\inƯ\left(9\right)\)
\(\Rightarrow n+2=\left\{\pm1;\pm3;\pm9\right\}\)\(\Rightarrow n=\left\{-3;\pm1;-5;-11;7\right\}\)
b) \(4n+7⋮n-3\Rightarrow4n-12+19⋮n-3\)mà \(4n-12=4\left(n-3\right)\Rightarrow4n-12⋮n-3\Rightarrow19⋮n-3\)
\(\Rightarrow n-3\inƯ\left(19\right)\Rightarrow n-3=\left\{\pm1;\pm19\right\}\Rightarrow n=\left\{2;3;-16;22\right\}\)