\(B=\sqrt{a-1+2\sqrt{a-1}+1}+\sqrt{a-1-2\sqrt{a-1}+1}\)
\(=\sqrt{\left(\sqrt{a-1}+1\right)^2}+\sqrt{\left(\sqrt{a-1}-1\right)^2}\)
\(=\left|\sqrt{a-1}+1\right|+\left|\sqrt{a-1}-1\right|\)
\(=\left[{}\begin{matrix}2\sqrt{a-1}\text{ với }a\ge2\\2\text{ với }1\le a\le2\end{matrix}\right.\)