ĐKXĐ : \(\left\{{}\begin{matrix}x\ge0\\x\ne0\\x\ne1\end{matrix}\right.\)
a )
\(S=\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}-2\sqrt{x}-1+2\sqrt{x}+2\)
\(=x-\sqrt{x}+1\)
b )
\(S=3\)
\(\Leftrightarrow x-\sqrt{x}+1=3\)
\(\Leftrightarrow x-\sqrt{x}-2=0\)
\(\Leftrightarrow\left(\sqrt{x}+1\right)\left(\sqrt{x}-2\right)=0\)
\(\Leftrightarrow\left[{}\begin{matrix}\sqrt{x}+1=0\\\sqrt{x}-2=0\end{matrix}\right.\Leftrightarrow\left[{}\begin{matrix}x\in\varnothing\\x=4\end{matrix}\right.\)
Vậy \(x=4\)