Để \(P \in \mathbb Z\)
\(\Rightarrow 3\ \vdots \ (\sqrt x-1)\)
\(\Rightarrow (\sqrt x-1) \in Ư(3)=\{ -3;-1;1;3\}\)
Với \(\sqrt x-1=-3\ \Rightarrow \sqrt x=-2<0\) (loại)
Với \(\sqrt x-1=-1\ \Rightarrow x=0\)
Với \(\sqrt x-1=1\ \Rightarrow x=4\)
Với \(\sqrt x-1=3\ \Rightarrow x=16\)
Vậy \(x \in \{0;4;16\}\)
Chúc bạn học tốt!