A.
ĐKXĐ: \(a>0;b>0\)
\(A=\dfrac{\left(\sqrt{a}+\sqrt{b}\right)^2-4\sqrt{ab}}{\sqrt{a}-\sqrt{b}}-\dfrac{a\sqrt{b}+b\sqrt{a}}{\sqrt{ab}}\)
\(=\dfrac{a+2\sqrt{ab}+b-4\sqrt{ab}}{\sqrt{a}-\sqrt{b}}-\dfrac{\sqrt{ab}\left(\sqrt{a}+\sqrt{b}\right)}{\sqrt{ab}}\)
\(=\dfrac{a-2\sqrt{ab}+b}{\sqrt{a}-\sqrt{b}}-\left(\sqrt{a}+\sqrt{b}\right)\)
\(=\dfrac{\left(\sqrt{a}-\sqrt{b}\right)^2}{\sqrt{a}-\sqrt{b}}-\sqrt{a}-\sqrt{b}\)
\(=\sqrt{a}-\sqrt{b}-\sqrt{a}-\sqrt{b}\)
\(=-2\sqrt{b}\)
B.
ĐKXĐ: \(x\ge0;x\ne1\)
\(B=\left(\dfrac{2x+1}{\left(\sqrt{x}-1\right)\left(x+\sqrt{x}+1\right)}-\dfrac{\sqrt{x}\left(\sqrt{x}-1\right)}{\left(\sqrt{x}-1\right)\left(x+\sqrt{x}+1\right)}\right)\left(\dfrac{\left(1+\sqrt{x}\right)\left(x-\sqrt{x}+1\right)}{1+\sqrt{x}}-\sqrt{x}\right)\)
\(=\left(\dfrac{2x+1-x+\sqrt{x}}{\left(\sqrt{x}-1\right)\left(x+\sqrt{x}+1\right)}\right)\left(x-\sqrt{x}+1-\sqrt{x}\right)\)
\(=\left(\dfrac{x+\sqrt{x}+1}{\left(\sqrt{x}-1\right)\left(x+\sqrt{x}+1\right)}\right)\left(x-2\sqrt{x}+1\right)\)
\(=\dfrac{\left(\sqrt{x}-1\right)^2}{\sqrt{x}-1}\)
\(=\sqrt{x}-1\)