a: \(P=\left(\dfrac{\sqrt{x}-2}{\left(\sqrt{x}-1\right)\left(\sqrt{x}+1\right)}-\dfrac{\sqrt{x}+2}{\left(\sqrt{x}+1\right)^2}\right)\cdot\dfrac{\left(x-1\right)^2}{2}\)
\(=\dfrac{x-\sqrt{x}-2-x-\sqrt{x}+2}{\left(\sqrt{x}+1\right)^2\cdot\left(\sqrt{x}-1\right)}\cdot\dfrac{\left(\sqrt{x}+1\right)^2\cdot\left(\sqrt{x}-1\right)^2}{2}\)
\(=-\sqrt{x}\left(\sqrt{x}-1\right)\)
b: Khi \(x=7-4\sqrt{3}\) thì \(P=-\left(2-\sqrt{3}\right)\left(1-\sqrt{3}\right)\)
\(=\left(2-\sqrt{3}\right)\left(\sqrt{3}-1\right)\)
\(=2\sqrt{3}-2-3+\sqrt{3}=3\sqrt{3}-5\)