a, Ta có :
\(P=\left(\dfrac{x+\sqrt{x}+1}{\left(x+1\right)^2-x}+\dfrac{x-\sqrt{x}+1}{\left(x+1\right)^2-x}\right):\dfrac{x+1}{\left(x-1\right)\left(x+\sqrt{x}+1\right)}\)
\(=\dfrac{x+\sqrt{x}+1+x-\sqrt{x}+1}{x^2+2x+1-x}\cdot\dfrac{\left(x-1\right)\left(x+\sqrt{x}+1\right)}{x+1}\)
\(=\dfrac{2x+2}{x^2+x+1}\cdot\dfrac{\left(x-1\right)\left(x^2+x+1\right)}{x+1}\)
\(=\dfrac{2\left(x+1\right)}{x^2+x+1}\cdot\dfrac{\left(x-1\right)\left(x^2+x+1\right)}{x+1}\)
\(=2\left(x-1\right)\)
b, P không lớn hơn 8 \(\Leftrightarrow\) P \(\le\) 8 hay \(2\left(x-1\right)\le8\)
\(\Leftrightarrow2x-2\le8\)
\(\Leftrightarrow2x\le10\)
\(\Leftrightarrow x\le5\)
Vậy để P \(\le\) 8 thì x \(\in\left\{x\in Z|x\le5\right\}\)