\(B=\dfrac{x-10}{x-5}\in Z\left(x\ne5\right)\)
\(\Rightarrow x-10⋮x-5\)
\(\Rightarrow x-10-\left(x-5\right)⋮x-5\)
\(\Rightarrow x-10-x+5⋮x-5\)
\(\Rightarrow-5⋮x-5\)
\(\Rightarrow x-5\in U\left(5\right)=\left\{-1;1;-5;5\right\}\)
\(\Rightarrow x\in\left\{4;6;0;10\right\}\)