\(B=\dfrac{x-\sqrt{x}+4-x+4-x-\sqrt{x}}{\left(\sqrt{x}-2\right)\left(\sqrt{x}+1\right)}\)
\(=\dfrac{-x-2\sqrt{x}+8}{\left(\sqrt{x}-2\right)\left(\sqrt{x}+1\right)}\)
\(=\dfrac{-\left(\sqrt{x}+4\right)\left(\sqrt{x}-2\right)}{\left(\sqrt{x}-2\right)\left(\sqrt{x}+1\right)}=\dfrac{-\sqrt{x}-4}{\sqrt{x}+1}\)