Giải thích các bước giải:
a) Ta có:
$P = \dfrac{{{x^2} - \sqrt x }}{{x + \sqrt x + 1}} - \dfrac{{2x + \sqrt x }}{{\sqrt x }} + \dfrac{{2\left( {x - 1} \right)}}{{\sqrt x - 1}}$ có nghĩa.
$\left\{ \begin{array}{l}
x \ge 0\\
x + \sqrt x + 1 \ne 0\left( {ld:do:x + \sqrt x + 1 = {{\left( {\sqrt x + \dfrac{1}{2}} \right)}^2} + \dfrac{3}{4} > 0,\forall x \ge 0} \right)\\
x \ne 1
\end{array} \right. \Leftrightarrow \left\{ \begin{array}{l}
x \ge 0\\
x \ne 1
\end{array} \right.$
Suy ra: ĐKXĐ của $P$ là: $x\ge 0; x\ne 1$
b) Ta có:
$\begin{array}{l}
P = \dfrac{{{x^2} - \sqrt x }}{{x + \sqrt x + 1}} - \dfrac{{2x + \sqrt x }}{{\sqrt x }} + \dfrac{{2\left( {x - 1} \right)}}{{\sqrt x - 1}}\\
= \dfrac{{\sqrt x \left( {\sqrt x - 1} \right)\left( {x + \sqrt x + 1} \right)}}{{x + \sqrt x + 1}} - \dfrac{{\sqrt x \left( {2\sqrt x + 1} \right)}}{{\sqrt x }} + \dfrac{{2\left( {\sqrt x - 1} \right)\left( {\sqrt x + 1} \right)}}{{\sqrt x - 1}}\\
= \sqrt x \left( {\sqrt x - 1} \right) - \left( {2\sqrt x + 1} \right) + 2\left( {\sqrt x + 1} \right)\\
= x - \sqrt x + 1
\end{array}$
Vậy $P = x - \sqrt x + 1$ với $x\ge 0; x\ne 1$