As stated, with real numbers $x_i$, it's false. After all, we could take something like $x_1=(\sqrt{2})^2$, $x_2=(2-\sqrt{2})^2$. For this to make sense, those $x_i$ must all be rational.
For $n=2$, this is easy to do in an elementary way. We can solve for one of the square roots and then square:
\begin{align*}x_1+x_2 &= S\\ \sqrt{x_1} &= S - \sqrt{x_2}\\ x_1 &= S^2 + x_2 - 2S\sqrt{x_2}\\
\sqrt{x_2} &= \frac{S^2+x_2-x_1}{2S}\end{align*}
With one of the square roots rational, the other has to be as well.
This does not generalize well, at least at this level of understanding. With larger numbers of square roots involved, squaring the other side leads to the square roots of the products getting involved, increasing the total number of square roots involved. We can work through it, but it requires the language of linear algebra and field extensions to make sense of it in general.
See also here for a proof of the general case.