a: \(P=\left(\frac{2}{\sqrt{x}-1}+\frac{\sqrt{x}}{\sqrt{x}+1}\right)\cdot\frac{\sqrt{x}}{x+\sqrt{x}+2}\)
\(=\frac{2\left(\sqrt{x}+1\right)+\sqrt{x}\left(\sqrt{x}-1\right)}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}\cdot\frac{\sqrt{x}}{x+\sqrt{x}+2}=\frac{2\sqrt{x}+2+x-\sqrt{x}}{x-1}\cdot\frac{\sqrt{x}}{x+\sqrt{x}+2}\)
\(=\frac{\sqrt{x}}{x-1}\)
b: \(x=3+2\sqrt2=\left(\sqrt2+1\right)^2\)
Thay \(x=\left(\sqrt2+1\right)^2\) vào P, ta được:
\(P=\frac{\sqrt{\left(\sqrt2+1\right)^2}}{3+2\sqrt2-1}=\frac{\sqrt2+1}{2\sqrt2+2}=\frac{\sqrt2+1}{2\left(\sqrt2+1\right)}=\frac12\)

