a) Ta có: \(P=\left(\frac{2-\sqrt{x}}{1-x}-\frac{\sqrt{x}-2}{x+2\sqrt{x}+1}\right):\frac{2}{x^2-2x+1}\)
\(=\left(\frac{\sqrt{x}-2}{x-1}-\frac{\sqrt{x}-2}{\left(\sqrt{x}+1\right)^2}\right)\cdot\frac{\left(x-1\right)^2}{2}\)
\(=\left(\frac{\left(\sqrt{x}-2\right)\left(\sqrt{x}+1\right)}{\left(\sqrt{x}+1\right)^2\cdot\left(\sqrt{x}-1\right)}-\frac{\left(\sqrt{x}-2\right)\left(\sqrt{x}-1\right)}{\left(\sqrt{x}+1\right)^2\cdot\left(\sqrt{x}-1\right)}\right)\cdot\frac{\left(x-1\right)^2}{2}\)
\(=\frac{x-\sqrt{x}-2-\left(x-3\sqrt{x}+2\right)}{\left(\sqrt{x}+1\right)^2\cdot\left(\sqrt{x}-1\right)}\cdot\frac{\left(\sqrt{x}-1\right)^2\cdot\left(\sqrt{x}+1\right)^2}{2}\)
\(=\frac{x-\sqrt{x}-2-x+3\sqrt{x}-2}{2}\cdot\frac{\left(\sqrt{x}-1\right)}{1}\)
\(=\frac{2\sqrt{x}-4}{2}\cdot\left(\sqrt{x}-1\right)\)
\(=\left(\sqrt{x}-2\right)\cdot\left(\sqrt{x}-1\right)\)
\(=x-3\sqrt{x}+2\)
b) ĐKXĐ: \(\left\{{}\begin{matrix}x\ge0\\x\ne1\end{matrix}\right.\)
Ta có: \(P+x\le2\)
\(\Leftrightarrow x-3\sqrt{x}+2+x-2\le0\)
\(\Leftrightarrow2x-3\sqrt{x}\le0\)
\(\Leftrightarrow\sqrt{x}\left(2\sqrt{x}-3\right)\le0\)
Trường hợp 1: \(\sqrt{x}\left(2\sqrt{x}-3\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}\sqrt{x}=0\\2\sqrt{x}-3=0\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=0\\2\sqrt{x}=3\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=0\\\sqrt{x}=\frac{3}{2}\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x=0\left(nhận\right)\\x=\frac{9}{4}\left(nhận\right)\end{matrix}\right.\)
Trường hợp 2: \(\sqrt{x}\left(2\sqrt{x}-3\right)< 0\)
mà \(\sqrt{x}\ge0\forall x\) thỏa mãn ĐKXĐ
nên \(2\sqrt{x}-3< 0\)
\(\Leftrightarrow2\sqrt{x}< 3\)
\(\Leftrightarrow\sqrt{x}< \frac{3}{2}\)
\(\Leftrightarrow x< \frac{9}{4}\)
mà \(\left\{{}\begin{matrix}x\ge0\\x\ne1\end{matrix}\right.\)
nên \(\left\{{}\begin{matrix}0< x< \frac{9}{4}\\x\ne1\end{matrix}\right.\)
Vây: Để \(P+x\le2\) thì \(\left\{{}\begin{matrix}0\le x\le\frac{9}{4}\\x\ne1\end{matrix}\right.\)