a) ĐKXĐ: \(\left\{{}\begin{matrix}a>0\\a\ne1\end{matrix}\right.\)
\(P=\left(\frac{\sqrt{a}+1}{\sqrt{a}-1}-\frac{\sqrt{a}-1}{\sqrt{a}+1}+4\sqrt{a}\right).\frac{1}{2a\sqrt{a}}\)
\(=\left[\frac{\left(\sqrt{a}+1\right)^2-\left(\sqrt{a}-1\right)^2+4\sqrt{a}\left(\sqrt{a}-1\right)\left(\sqrt{a}+1\right)}{\left(\sqrt{a}-1\right)\left(\sqrt{a}+1\right)}\right].\frac{1}{2a\sqrt{a}}\)
\(=\frac{a+2\sqrt{a}+1-\left(a-2\sqrt{a}+1\right)+4a\sqrt{a}-4\sqrt{a}}{\left(\sqrt{a}-1\right)\left(\sqrt{a}+1\right)}.\frac{1}{2a\sqrt{a}}\)
\(=\frac{4a\sqrt{a}}{a-1}.\frac{1}{2a\sqrt{a}}\)\(=\frac{2}{a-1}\)
b) P = a \(\Leftrightarrow\frac{2}{a-1}=a\Leftrightarrow a^2-a-2=0\)\(\Leftrightarrow\left(a-2\right)\left(a+1\right)=0\)\(\Leftrightarrow a=2\)(vì a > 0)