Ta có: \(B=\left(\frac{\sqrt{x}}{\sqrt{x}+4}+\frac{4}{\sqrt{x}-4}\right):\frac{x+16}{\sqrt{x}+2}\)
\(=\left(\frac{\sqrt{x}\left(\sqrt{x}-4\right)}{\left(\sqrt{x}+4\right)\left(\sqrt{x}-4\right)}+\frac{4\left(\sqrt{x}+4\right)}{\left(\sqrt{x}-4\right)\left(\sqrt{x}+4\right)}\right)\cdot\frac{\sqrt{x}+2}{x+16}\)
\(=\frac{x-4\sqrt{x}+4\sqrt{x}+16}{\left(\sqrt{x}-4\right)\left(\sqrt{x}+4\right)}\cdot\frac{\sqrt{x}+2}{x+16}\)
\(=\frac{x+16}{x-16}\cdot\frac{\sqrt{x}+2}{x+16}\)
\(=\frac{\sqrt{x}+2}{x-16}\)