\(\frac{n-5}{n+1}=\frac{n+1-6}{n+1}=1-\frac{6}{n+1}\)
\(\Rightarrow n+1\inƯ\left(6\right)=\left\{-1;1;-6;6\right\}\)
\(\Rightarrow n+1=-1\Rightarrow n=-2\)
\(\Rightarrow n+1=1\Rightarrow n=0\)
\(\Rightarrow n+1=-6\Rightarrow n=-7\)
\(\Rightarrow n+1=6\Rightarrow n=5\)