2.
A=\(\sqrt{\sqrt{\left(\sqrt{16}-\sqrt{12}\right)^2}}-\sqrt{\sqrt{\left(\sqrt{16}+\sqrt{12}\right)^2}}\)
\(=\sqrt{4-2\sqrt{3}}-\sqrt{4+2\sqrt{3}}\)
\(=\sqrt{\left(\sqrt{3}-\sqrt{1}\right)^2}-\sqrt{\left(\sqrt{3}+\sqrt{1}\right)^2}\)
\(=\sqrt{3}-1-\left(\sqrt{3}+1\right)\)
\(=\sqrt{3}-1-\sqrt{3}-1\)
\(=-2\)
B= \(\sqrt{5-2\sqrt{2+\sqrt{\left(\sqrt{8}+\sqrt{1}\right)^2}}}\)
\(=\sqrt{5-2\sqrt{2+\sqrt{8}+1}}\)
\(=\sqrt{5-2\sqrt{3+2\sqrt{2}}}\)
\(=\sqrt{5-2\sqrt{\left(\sqrt{2}+\sqrt{1}\right)^2}}\)
\(=\sqrt{5-2\sqrt{2}-2}\)
\(=\sqrt{3-2\sqrt{2}}\)
\(=\sqrt{\left(\sqrt{2}-\sqrt{1}\right)^2}\)
\(=\sqrt{2}-1\)