ĐKXĐ: \(x\ge0;x\ne1\)
\(A=\left(\frac{x+2}{\left(\sqrt{x}-1\right)\left(x+\sqrt{x}+1\right)}+\frac{\sqrt{x}\left(\sqrt{x}-1\right)}{\left(\sqrt{x}-1\right)\left(x+\sqrt{x}+1\right)}-\frac{x+\sqrt{x}+1}{\left(\sqrt{x}-1\right)\left(x+\sqrt{x}+1\right)}\right).\frac{2}{\sqrt{x}-1}\)
\(=\left(\frac{x+2+x-\sqrt{x}-x-\sqrt{x}-1}{\left(\sqrt{x}-1\right)\left(x+\sqrt{x}+1\right)}\right)\left(\frac{2}{\sqrt{x}-1}\right)\)
\(=\frac{\left(x-2\sqrt{x}+1\right)}{\left(\sqrt{x}-1\right)\left(x+\sqrt{x}+1\right)}.\frac{2}{\left(\sqrt{x}-1\right)}=\frac{2\left(\sqrt{x}-1\right)^2}{\left(\sqrt{x}-1\right)^2\left(x+\sqrt{x}+1\right)}=\frac{2}{x+\sqrt{x}+1}\)
Ta có \(x\ge0\Rightarrow x+\sqrt{x}\ge0\Rightarrow x+\sqrt{x}+1>0\)
\(\Rightarrow A=\frac{2}{x+\sqrt{x}+1}>0\)
Mặt khác cũng do \(x+\sqrt{x}+1\ge1\Rightarrow P\le\frac{2}{1}=2\)
\(\Rightarrow A_{max}=2\) khi \(x=0\)