Ta có: \(A=\frac{x}{x-\sqrt{x}}+\frac{2}{x+2\sqrt{x}}+\frac{x+2}{x\sqrt{x}+x-2\sqrt{x}}\)
\(=\frac{x}{\sqrt{x}\left(\sqrt{x}-1\right)}+\frac{2}{\sqrt{x}\left(\sqrt{x}+2\right)}+\frac{x+2}{\sqrt{x}\left(\sqrt{x}-1\right)\left(\sqrt{x}+2\right)}\)
\(=\frac{x\left(\sqrt{x}+2\right)}{\sqrt{x}\left(\sqrt{x}-1\right)\left(\sqrt{x}+2\right)}+\frac{2\left(\sqrt{x}-1\right)}{\sqrt{x}\left(\sqrt{x}-1\right)\left(\sqrt{x}+2\right)}+\frac{x+2}{\sqrt{x}\left(\sqrt{x}-1\right)\left(\sqrt{x}+2\right)}\)
\(=\frac{x\sqrt{x}+2x+2\sqrt{x}-2+x+2}{\sqrt{x}\left(\sqrt{x}-1\right)\left(\sqrt{x}+2\right)}\)
\(=\frac{x\sqrt{x}+3x+2\sqrt{x}}{\sqrt{x}\left(\sqrt{x}-1\right)\left(\sqrt{x}+2\right)}\)
\(=\frac{\sqrt{x}\left(x+3\sqrt{x}+2\right)}{\sqrt{x}\left(\sqrt{x}-1\right)\left(\sqrt{x}+2\right)}\)
\(=\frac{x+\sqrt{x}+2\sqrt{x}+2}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+2\right)}\)
\(=\frac{\sqrt{x}\left(\sqrt{x}+1\right)+2\left(\sqrt{x}+1\right)}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+2\right)}\)
\(=\frac{\left(\sqrt{x}+1\right)\left(\sqrt{x}+2\right)}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+2\right)}\)
\(=\frac{\sqrt{x}+1}{\sqrt{x}-1}\)