\(\sqrt{x^2-5x+4}\ge0\) với mọi x thuộc TXĐ
\(\Rightarrow A\le15\Rightarrow A_{max}=15\) khi \(x^2-5x+4=0\Leftrightarrow\left\{{}\begin{matrix}x=1\\x=4\end{matrix}\right.\)
\(\sqrt{x^2+2x+3}=\sqrt{\left(x+1\right)^2+2}\ge\sqrt{2}\) ; \(\forall x\)
\(\Rightarrow B\le-1-\sqrt{2}\Rightarrow B_{max}=-1-\sqrt{2}\) khi \(x=-1\)