Lời giải:
Để $B$ nguyên thì $x-2\vdots 3x$
$\Rightarrow 3(x-2)\vdots 3x$
$\Leftrightarrow 3x-6\vdots 3x$
$\Leftrightarrow 6\vdots 3x$
$\Leftrightarrow 2\vdots x$
$\Rightarrow x\in\left\{\pm 1;\pm 2\right\}$
Thử lại ta thấy $x\in\left\{-1;2\right\}$
Để B nguyên thì \(x-2⋮3x\)
\(\Leftrightarrow-6⋮3x\)
\(\Leftrightarrow3x\in\left\{1;-1;2;-2;3;-3;6;-6\right\}\)
\(\Leftrightarrow x\in\left\{\dfrac{1}{3};-\dfrac{1}{3};\dfrac{2}{3};-\dfrac{2}{3};1;-1;2;-2\right\}\)
mà x nguyên
nên \(x\in\left\{1;-1;2;-2\right\}\)