a: ĐKXĐ: x>=0; x<>16
\(P=\dfrac{2x+8+x-4\sqrt{x}-8\sqrt{x}-8}{\left(\sqrt{x}-4\right)\left(\sqrt{x}+1\right)}\)
\(=\dfrac{3x-12\sqrt{x}}{\left(\sqrt{x}-4\right)\left(\sqrt{x}+1\right)}=\dfrac{3\sqrt{x}}{\sqrt{x}+1}\)
b: Để P là số nguyên thì \(3\sqrt{x}+3-3⋮\sqrt{x}+1\)
=>\(\sqrt{x}+1\in\left\{1;3\right\}\)
hay \(x\in\left\{0\right\}\)