a) \(n-1⋮n+2\Leftrightarrow n+2-3⋮n+2\Leftrightarrow-3⋮n+2\Leftrightarrow3⋮n+2\)
\(\Leftrightarrow n+2\inƯ\left(3\right)\)
\(\Leftrightarrow n+2\in\left\{1;3;-1;-3\right\}\)
\(\Leftrightarrow n\in\left\{-1;1;-3;-5\right\}\)
b) \(2n⋮n+1\Leftrightarrow2n+2-2⋮n+1\Leftrightarrow2\left(n+1\right)-2⋮n+1\Leftrightarrow-2⋮n+1\Leftrightarrow2⋮n+1\)
\(\Leftrightarrow n+1\inƯ\left(2\right)\)
\(\Leftrightarrow n+1\in\left\{1;2;-1;-2\right\}\)
\(\Leftrightarrow n\in\left\{0;1;-2;-3\right\}\)