ĐKXĐ: 0\(\le\)x\(\ne\)4.
\(B=\dfrac{\left(\sqrt{x}+1\right)\left(\sqrt{x}+2\right)+2\sqrt{x}\left(\sqrt{x}-2\right)-2-5\sqrt{x}}{x-4}\)=\(\dfrac{3x-6\sqrt{x}}{x-4}=\dfrac{3\sqrt{x}\left(\sqrt{x}-2\right)}{\left(\sqrt{x}+2\right)\left(\sqrt{x}-2\right)}=\dfrac{3\sqrt{x}}{\sqrt{x}+2}\).