\(P=\left(\dfrac{\left(\sqrt{a}-1\right)\left(a+\sqrt{a}+1\right)}{\sqrt{a}\left(\sqrt{a}-1\right)}-\dfrac{\left(\sqrt{a}+1\right)\left(a-\sqrt{a}+1\right)}{\sqrt{a}\left(\sqrt{a}+1\right)}\right).\left(\dfrac{a-2}{a+2}\right)\)
\(=\left(\dfrac{a+\sqrt{a}+1}{\sqrt{a}}-\dfrac{a-\sqrt{a}+1}{\sqrt{a}}\right).\left(\dfrac{a-2}{a+2}\right)\)
\(=\left(\dfrac{2\sqrt{a}}{\sqrt{a}}\right).\left(\dfrac{a-2}{a+2}\right)=\dfrac{2a-4}{a+2}\)
\(P=\dfrac{2a+4-8}{a+2}=2-\dfrac{8}{a+2}\)
P nguyên \(\Rightarrow\dfrac{8}{a+2}\in Z\Rightarrow a+2=Ư\left(8\right)\)
Mà \(a>0;a\ne1;a\ne2\Rightarrow a+2=8\)
\(\Rightarrow a=6\)