a, \(A=\left|x-2017\right|+\left|2018-x\right|\ge\left|x-2017+2018-x\right|=1\)
Vậy \(Min=1\Leftrightarrow2017\le x\le2018\)
b, \(B=\dfrac{x^2+4+8}{x^2+4}=1+\dfrac{8}{x^2+4}\)
Thấy : \(x^2+4\ge4\)
\(\Rightarrow B=1+\dfrac{8}{x^2+4}\le3\)
Vậy \(Max=3\Leftrightarrow x=0\)