a) ĐKXĐ : \(a\ge0;a\ne1\)
Ta có: \(P=\left(\frac{2a+1}{\left(\sqrt{a}-1\right)\left(a+\sqrt{a}+1\right)}-\frac{\sqrt{a}\left(\sqrt{a}-1\right)}{\left(\sqrt{a}-1\right)\left(a+\sqrt{a}+1\right)}\right)\cdot\left(\frac{\left(\sqrt{a}+1\right)\left(a-\sqrt{a}+1\right)}{\left(\sqrt{a}+1\right)}-\sqrt{a}\right)\) \(=\frac{2a+1-a+\sqrt{a}}{\left(\sqrt{a}-1\right)\left(a+\sqrt{a}+1\right)}\cdot\left(a-\sqrt{a}+1-\sqrt{a}\right)\)
\(=\frac{1}{\left(\sqrt{a}-1\right)}\cdot\left(\sqrt{a}-1\right)^2=\sqrt{a}-1\)