Lời giải:
Cần bổ sung điều kiện $x$ là số nguyên.
a.
$2x+5\vdots x+1$
$\Rightarrow 2(x+1)+3\vdots x+1$
$\Rightarrow 3\vdots x+1$
$\Rightarrow x+1\in\left\{\pm 1; \pm 3\right\}$
$\Rightarrow x\in\left\{0; -2; 2; -4\right\}$
b.
$-x-5\vdots -x-1$
$\Rightarrow (-x-1)-4\vdots -x-1$
$\Rightarrow 4\vdots -x-1$
$\Rightarrow -x-1\in\left\{\pm 1; \pm 2; \pm 4\right\}$
$\Rightarrow x\in \left\{0; -2; 1; -3; 3; -5\right\}$
a: =>2x+2+3 chia hêt cho x+1
=>\(x+1\in\left\{1;-1;3;-3\right\}\)
=>\(x\in\left\{0;-2;2;-4\right\}\)
b: =>x+5 chia hết cho x+1
=>\(x+1\in\left\{1;-1;2;-2;4;-4\right\}\)
=>\(x\in\left\{0;-2;1;-3;3;-5\right\}\)