Also we can make the following.
Let $x_1=x_2=...=x_{n-1}=0$ and $x_n=1$.
Hence, we get a value $1$ and it's a maximal value because for this we need to probe that
$$\sum_{i=1}^nx_i^2+\sqrt{\prod_{i=1}^nx_i}\leq\left(\sum_{i=1}^nx_i\right)^2,$$
which is true by AM-GM.
Indeed, let $\prod\limits_{i=1}^nx_i=w^n$, where $w\geq0$, $\sum\limits_{1\leq i<j\leq n}x_ix_j=\frac{n(n-1)}{2}v^2$, where $v\geq0$, and $\sum\limits_{i=1}^nx_1=nu$.
Hence, by AM-GM $u\geq w$,$v\geq w$ and we need to prove that
$$n^2(n-1)^2v^4\geq w^n$$ or
$$n^2(n-1)^2v^4\cdot n^{n-4}u^{n-4}\geq w^n,$$
which is obviously true for $n\geq4$.
Thus, it's remains to understand, what happens for $n=2$ and for $n=3$, which is for you.