\(B=\dfrac{3}{\sqrt{x}+1}+\dfrac{1}{1-\sqrt{x}}+\dfrac{x+5}{x-1}\)
\(=\dfrac{3}{\sqrt{x}+1}-\dfrac{1}{\sqrt{x}-1}+\dfrac{x+5}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}\)
\(=\dfrac{3\left(\sqrt{x}-1\right)-\left(\sqrt{x}+1\right)+x+5}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}\)
\(=\dfrac{3\sqrt{x}-3-\sqrt{x}-1+x+5}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}\)
\(=\dfrac{2\sqrt{x}+x+1}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}\)
\(=\dfrac{\sqrt{x}^2+2\sqrt{x}+1}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}\)
\(=\dfrac{\left(\sqrt{x}+1\right)^2}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}\)
\(=\dfrac{\sqrt{x}+1}{\sqrt{x}-1}\left(đpcm\right)\)