The results of the Mathematica's code
f := Function[{n, x}, n^2*x^(n - 1) - D[(x^n - 1)/(x - 1), x]]
g := Function[{n, x},Sqrt[f[n, x]]/n + Sum[Sqrt[f[j, x]]/(j*(j + 1)), {j, 1, n - 1}]]
n = 60; FullSimplify[ g[n, x]^2 + Sum[(g[n, x] - g[k, x])^2, {k, 1, n}]]
60 x^59
n = 34; FullSimplify[g[n, x]^2 + Sum[(g[n, x] - g[k, x])^2, {k, 1, n}]]
34 x^33
suggest the answer $nx^{n-1}$.