1: \(P=\dfrac{3a+3\sqrt{a}-3-a+1-a+4}{\left(\sqrt{a}+2\right)\left(\sqrt{a}-1\right)}\)
\(=\dfrac{a+3\sqrt{a}+2}{\left(\sqrt{a}+2\right)\left(\sqrt{a}-1\right)}=\dfrac{\sqrt{a}+1}{\sqrt{a}-1}\)
2: Để P nguyên thì \(\sqrt{a}-1+2⋮\sqrt{a}-1\)
\(\Leftrightarrow\sqrt{a}-1\in\left\{1;-1;2\right\}\)
hay \(a\in\left\{4;0;9\right\}\)