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