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