\(A=\dfrac{2\left(x^2+1\right)+\left(x^2-2x+1\right)}{x^2+1}=2+\dfrac{\left(x-1\right)^2}{x^2+1}\ge2\)
\(A_{min}=2\) khi \(x=1\)
\(B=\dfrac{2x^2-2x+5}{x^2+2}=\dfrac{3\left(x^2+2\right)-x^2-2x-1}{x^2+2}=3-\dfrac{\left(x+1\right)^2}{x^2+2}\le3\)
\(B_{max}=3\) khi \(x=-1\)