a: \(P=\left(\dfrac{x+\sqrt{x}+1}{\sqrt{x}+1}-\sqrt{x}-1\right):\dfrac{x-\sqrt{x}+\sqrt{x}}{\sqrt{x}-1}\)
\(=\dfrac{x+\sqrt{x}+1-x-2\sqrt{x}-1}{\left(\sqrt{x}+1\right)}\cdot\dfrac{\sqrt{x}-1}{x}\)
\(=\dfrac{-\sqrt{x}}{x}\cdot\dfrac{\sqrt{x}-1}{\sqrt{x}+1}=\dfrac{-\sqrt{x}+1}{x+\sqrt{x}}\)
b: Để P=3 thì \(-\sqrt{x}+1=3x+3\sqrt{x}\)
\(\Leftrightarrow3x+4\sqrt{x}-1=0\)
\(\Leftrightarrow\sqrt{x}=\dfrac{\sqrt{7}-2}{3}\)
hay \(x=\left(\dfrac{\sqrt{7}-2}{3}\right)^2\)