Ta có: \(\dfrac{8+x\left(1+\sqrt{x-2\sqrt{x}+1}\right)}{\left(x-4\right)\left(x-2\sqrt{x}+4\right)}+\dfrac{x-3\sqrt{x}}{2\left(x-\sqrt{x}-6\right)}\)
\(=\dfrac{8+x\left(1+\sqrt{x}-1\right)}{\left(x-4\right)\left(x-2\sqrt{x}+4\right)}+\dfrac{\sqrt{x}\left(\sqrt{x}-3\right)}{2\left(\sqrt{x}-3\right)\left(\sqrt{x}+2\right)}\)
\(=\dfrac{x\sqrt{x}+8}{\left(x-4\right)\left(x-2\sqrt{x}+4\right)}+\dfrac{\sqrt{x}}{2\left(\sqrt{x}+2\right)}\)
\(=\dfrac{\sqrt{x}+2}{x-4}+\dfrac{\sqrt{x}}{2\left(\sqrt{x}+2\right)}\)
\(=\dfrac{1}{\sqrt{x}-2}+\dfrac{\sqrt{x}}{2\left(\sqrt{x}+2\right)}\)
\(=\dfrac{2\left(\sqrt{x}+2\right)+\sqrt{x}\left(\sqrt{x}-2\right)}{2\left(\sqrt{x}+2\right)\left(\sqrt{x}-2\right)}\)
\(=\dfrac{2\sqrt{x}+4+x-2\sqrt{x}}{2\left(x-4\right)}\)
\(=\dfrac{x+4}{2x-8}\)