Try
solve (x1-u+x2-u+x3-u+x4-u)/v=0, -4/(2 v)+((x1-u)^2+(x2-u)^2+(x3-u)^2+(x4-u)^2)/(2 v^2)=0 for u,v
here
WA
If you study the form of that solution carefully then I think that might let you realize the form of the solution for general n. You can extend that example to include x5 and see that the form of the solution persists.
I believe there are two typos in your desktop published equations, in both cases you are summing over n from 1 to n when those should almost certainly be summing over i from 1 to n.
If you absolutely must give your problem to WolframAlpha in Latex and you must pose your problem for abstract values of n then perhaps someone else can help you with that, those are far beyond me.