\(P=\frac{\left(\sqrt{a}+2\right)^2}{\sqrt{a}+2}+\frac{\left(2-\sqrt{a}\right)\left(2+\sqrt{a}\right)}{2-\sqrt{a}}\)
\(=\sqrt{a}+2+2+\sqrt{a}=2\sqrt{a}+4\)
\(P=a+1\Rightarrow2\sqrt{a}+4=a+1\)
\(\Leftrightarrow a-2\sqrt{a}-3=0\)
\(\Leftrightarrow\left(\sqrt{a}+1\right)\left(\sqrt{a}-3\right)=0\)
\(\Rightarrow\left[{}\begin{matrix}\sqrt{a}+1=0\left(vn\right)\\\sqrt{a}-3=0\end{matrix}\right.\) \(\Rightarrow\sqrt{a}=3\Rightarrow a=9\)