ĐKXĐ: ...
\(P=\frac{\left(\sqrt{x}-1\right)\left(x+\sqrt{x}+1\right)}{\sqrt{x}\left(\sqrt{x}-1\right)}-\frac{\left(\sqrt{x}+1\right)\left(x-\sqrt{x}+1\right)}{\sqrt{x}\left(\sqrt{x}+1\right)}+\frac{x+1}{\sqrt{x}}\)
\(=\frac{x+\sqrt{x}+1}{\sqrt{x}}-\frac{x-\sqrt{x}+1}{\sqrt{x}}+\frac{x+1}{\sqrt{x}}\)
\(=\frac{x+2\sqrt{x}+1}{\sqrt{x}}\) \(\left(=\frac{\left(\sqrt{x}+1\right)^2}{\sqrt{x}}\right)\)
\(P=\frac{9}{2}\Leftrightarrow\frac{x+2\sqrt{x}+1}{\sqrt{x}}=\frac{9}{2}\)
\(\Leftrightarrow2x+4\sqrt{x}+2=9\sqrt{x}\)
\(\Leftrightarrow2x-5\sqrt{x}+2=0\)
\(\Leftrightarrow\left(\sqrt{x}-2\right)\left(2\sqrt{x}-1\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}\sqrt{x}=2\\\sqrt{x}=\frac{1}{2}\end{matrix}\right.\) \(\Rightarrow\left[{}\begin{matrix}x=4\\x=\frac{1}{4}\end{matrix}\right.\)