Đáp án:
$\begin{array}{l}
a)Dkxd:x > 0;x \ne 1\\
Q = \left( {\dfrac{{\sqrt x + 2}}{{x - 2\sqrt x + 1}} - \dfrac{{\sqrt x - 2}}{{x - 1}}} \right).\dfrac{{\sqrt x + 1}}{{\sqrt x }}\\
= \left( {\dfrac{{\sqrt x + 2}}{{{{\left( {\sqrt x - 1} \right)}^2}}} - \dfrac{{\sqrt x - 2}}{{\left( {\sqrt x - 1} \right)\left( {\sqrt x + 1} \right)}}} \right).\dfrac{{\sqrt x + 1}}{{\sqrt x }}\\
= \dfrac{{\left( {\sqrt x + 2} \right)\left( {\sqrt x + 1} \right) - \left( {\sqrt x - 2} \right)\left( {\sqrt x - 1} \right)}}{{{{\left( {\sqrt x - 1} \right)}^2}.\left( {\sqrt x + 1} \right)}}.\dfrac{{\sqrt x + 1}}{{\sqrt x }}\\
= \dfrac{{x + 3\sqrt x + 2 - x + 3\sqrt x - 2}}{{{{\left( {\sqrt x - 1} \right)}^2}}}.\dfrac{1}{{\sqrt x }}\\
= \dfrac{{6\sqrt x }}{{{{\left( {\sqrt x - 1} \right)}^2}}}.\dfrac{1}{{\sqrt x }}\\
= \dfrac{6}{{{{\left( {\sqrt x - 1} \right)}^2}}}\\
b)Q = \dfrac{6}{{{{\left( {\sqrt x - 1} \right)}^2}}} \in Z\\
\Leftrightarrow {\left( {\sqrt x - 1} \right)^2} \in \left\{ {1;2;3;6} \right\}\\
\Leftrightarrow {\left( {\sqrt x - 1} \right)^2} = 1\left( {do:x \in Z} \right)\\
\Leftrightarrow \left[ \begin{array}{l}
\sqrt x - 1 = 1\\
\sqrt x - 1 = - 1
\end{array} \right.\\
\Leftrightarrow \left[ \begin{array}{l}
\sqrt x = 2\\
\sqrt x = 0
\end{array} \right.\\
\Leftrightarrow \left[ \begin{array}{l}
x = 4\left( {tm} \right)\\
x = 0\left( {ktm} \right)
\end{array} \right.\\
Vậy\,x = 4
\end{array}$