\(B=\dfrac{x-2}{x-5}=\dfrac{x-5+3}{x-5}=1+\dfrac{3}{x-5}\)
Để B nguyên thì \(\dfrac{3}{x-5}\) nguyên hay x-5∈ Ư(3)={1;-1;3;-3}
⇔ x = {6;4;8;2}
Để B nguyên thì \(x-2⋮x-5\)
\(\Leftrightarrow x-5\in\left\{1;-1;3;-3\right\}\)
hay \(x\in\left\{6;4;8;2\right\}\)