\(A=\left(\dfrac{x+2}{x\sqrt{x}-1}+\dfrac{\sqrt{x}+2}{x+\sqrt{x}+1}+\dfrac{1}{1-\sqrt{x}}\right):\dfrac{\sqrt{x}+1}{x+\sqrt{x}+1}\)
\(=\left[\dfrac{x+2}{\sqrt{x^3}-1}+\dfrac{\left(\sqrt{x}+2\right)\left(\sqrt{x}-1\right)}{\sqrt{x^3}-1}-\dfrac{x+\sqrt{x}+1}{\sqrt{x^3}-1}\right]:\dfrac{\sqrt{x}+1}{x+\sqrt{x}+1}\)
\(=\left(\dfrac{x+2+x-\sqrt{x}+2\sqrt{x}-2-x-\sqrt{x}-1}{\sqrt{x^3}-1}\right):\dfrac{\sqrt{x}+1}{x+\sqrt{x}+1}\)
\(=\dfrac{x-1}{\left(\sqrt{x}-1\right)\left(x+\sqrt{x}+1\right)}.\dfrac{x+\sqrt{x}+1}{\sqrt{x}+1}\)
\(=1\)
\(P=\left(\dfrac{\sqrt{a}+1}{\sqrt{a}-1}-\dfrac{\sqrt{a}-1}{\sqrt{a}+1}+4\sqrt{a}\right).\dfrac{1}{2a\sqrt{a}}\)
\(=\left[\dfrac{\left(\sqrt{a}+1\right)^2}{a-1}-\dfrac{\left(\sqrt{a}-1\right)^2}{a-1}+\dfrac{4\sqrt{a}\left(a-1\right)}{a-1}\right].\dfrac{1}{2a\sqrt{a}}\)
\(=\left(\dfrac{a+2\sqrt{a}+1-a+2\sqrt{a}-1+4a\sqrt{a}-4\sqrt{a}}{a-1}\right).\dfrac{1}{2a\sqrt{a}}\)
\(=\dfrac{4a\sqrt{a}}{a-1}.\dfrac{1}{2a\sqrt{a}}\)
\(=\dfrac{2}{a-1}\)