ĐKXĐ: \(x\ge0\)
Th1: \(x\ge4\) pt trở thành:
\(\sqrt{x}+2=x-4\)
\(\Leftrightarrow x-\sqrt{x}-6=0\)
\(\Rightarrow\left[{}\begin{matrix}\sqrt{x}=-2\left(ktm\right)\\\sqrt{x}=3\end{matrix}\right.\)
\(\Rightarrow x=9\) (thỏa)
TH2: \(0\le x< 4\) pt trở thành:
\(\sqrt{x}+2=4-x\)
\(\Leftrightarrow x+\sqrt{x}-2=0\Rightarrow\left[{}\begin{matrix}\sqrt{x}=-2\left(ktm\right)\\\sqrt{x}=1\end{matrix}\right.\)
\(\Rightarrow x=1\) (thỏa)
Vậy \(S=\left\{1;9\right\}\)