Lời giải:
a) \(12\vdots x+1\Rightarrow x+1\in \text{Ư}(12)\)
Mà \(x\in\mathbb{N}\Rightarrow x+1\in\mathbb{N}\). Do đó \(x+1\in \left\{1; 2;3;4;6;12\right\}\)
\(\Rightarrow x\in \left\{0; 1;2;3;5;11\right\}\)
b)
\(x+5\vdots x+1\)
\(\Rightarrow (x+1)+4\vdots x+1\)
\(\Rightarrow 4\vdots x+1\Rightarrow x+1\in \text{Ư}(4)\). Mà \(x\in \mathbb{N}\Rightarrow x+1\in \mathbb{N}\)
Do đó: \(x+1\in \left\{1;2;4\right\}\)
\(\Rightarrow x\in \left\{0; 1;3\right\}\)