\(B=\sqrt{x-1+2\sqrt{x-1}+1}+\sqrt{x-1-2\sqrt{x-1}+1}\)
\(=\sqrt{\left(\sqrt{x-1}+1\right)^2}+\sqrt{\left(\sqrt{x-1}-1\right)^2}\)
\(=\left|\sqrt{x-1}+1\right|+\left|\sqrt{x-1}-1\right|\)
TH1: \(x\ge2\Rightarrow B=\sqrt{x-1}+1+\sqrt{x-1}-1=2\sqrt{x-1}\)
TH2: \(1\le x< 2\Rightarrow B=\sqrt{x-1}+1+1-\sqrt{x-1}=2\)
\(A^2=2x+2\sqrt{x^2-\left(x^2-4\right)}=2x+4\)
\(\Rightarrow A=\sqrt{2x+4}\)