Ta có: \(B=\left|x-1\right|+\left|x-2\right|=\left|x-1\right|+\left|2-x\right|\)
Áp dụng bđt \(\left|a\right|+\left|b\right|\ge\left|a+b\right|\) có:
\(B\ge\left|x-1+2-x\right|=\left|-1\right|=1\)
Dấu " = " xảy ra khi \(x-1\ge0;2-x\ge0\)
\(\Rightarrow x\ge1;x\le2\)
\(\Rightarrow1\le x\le2\)
Vậy \(MIN_B=1\) khi \(1\le x\le2\)