\(A=\frac{8}{4+2\sqrt{x}}-\frac{2-\sqrt{x}}{4-x}\)
\(=\frac{8}{2\left(2+\sqrt{x}\right)}-\frac{2-\sqrt{x}}{\left(2-\sqrt{x}\right)\left(2+\sqrt{x}\right)}\)
\(=\frac{4}{2+\sqrt{x}}-\frac{1}{2+\sqrt{x}}\)
\(=\frac{3}{2+\sqrt{x}}\)
\(B=\frac{x\sqrt{y}+y\sqrt{x}}{\sqrt{xy}}:\frac{1}{\sqrt{x}-\sqrt{y}}-x\)
\(=\frac{\sqrt{xy}\left(\sqrt{x}+\sqrt{y}\right)}{\sqrt{xy}}.\left(\sqrt{x}-\sqrt{y}\right)-x\)
\(=x-y-x=-y\)