Ta có: \(P=\sqrt{x}-\dfrac{1}{\sqrt{x}}:\dfrac{\sqrt{x}-1}{\sqrt{x}}-\dfrac{\sqrt{x}-1}{x+\sqrt{x}}\)
\(=\sqrt{x}-\dfrac{1}{\sqrt{x}}\cdot\dfrac{\sqrt{x}}{\sqrt{x}-1}-\dfrac{\sqrt{x}-1}{x+\sqrt{x}}\)
\(=\sqrt{x}-\dfrac{1}{\sqrt{x}-1}-\dfrac{\sqrt{x}-1}{x+\sqrt{x}}\)
\(=\dfrac{\sqrt{x}\left(x-1\right)}{\sqrt{x}\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}-\dfrac{\sqrt{x}\left(\sqrt{x}+1\right)}{\sqrt{x}\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}-\dfrac{\left(\sqrt{x}-1\right)^2}{\sqrt{x}\left(\sqrt{x}+1\right)\left(\sqrt{x}-1\right)}\)
\(=\dfrac{x\sqrt{x}-\sqrt{x}-x-\sqrt{x}-\left(x-2\sqrt{x}+1\right)}{\sqrt{x}\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}\)
\(=\dfrac{x\sqrt{x}-2\sqrt{x}-x-x+2\sqrt{x}-1}{\sqrt{x}\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}\)
\(=\dfrac{x\sqrt{x}-\sqrt{x}-\sqrt{x}-1}{\sqrt{x}\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}\)
\(=\dfrac{\sqrt{x}\left(x-1\right)-\left(\sqrt{x}+1\right)}{\sqrt{x}\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}\)
\(=\dfrac{\sqrt{x}\left(\sqrt{x}+1\right)\left(\sqrt{x}-1\right)-\left(\sqrt{x}+1\right)}{\sqrt{x}\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}\)
\(=\dfrac{\left(\sqrt{x}+1\right)\left(x-\sqrt{x}-1\right)}{\sqrt{x}\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}\)
\(=\dfrac{x-\sqrt{x}-1}{x-\sqrt{x}}\)