Given positive real numbers $x_1,x_2,\ldots,x_n$ such that $\sum_{k=1}^{n}{\frac{1}{x_k+1}}=n-2$ , how to prove the following inequality? Given positive real numbers $x_1,x_2,\ldots,x_n$ such that $\sum_{k=1}^{n}{\frac{1}{x_k+1}}=n-2$ , prove that
$$
\sum_{i=1}^{n}{\frac{1}{x_i}}+\frac{n(n-2)}{\sum_{i=1}^{n}{x_i}}\geqslant(n-1)(n-2)
$$
This problem was initially asked on the site 'zhihu'. The case $n=3$ has been proved by 'SOS' method, and I've given a $pqr$ method proof. How to prove (or falsify) this generalised inequality?
I've tried to set $a_i=1/x_i$ , then $\sum_{k=1}^{n}{\frac{a_k}{a_k+1}}=n-2$  and the inequality is equivalent to
$$
nA+(n-2)H\geqslant(n-1)(n-2)
$$
where $A$ is the Arithmetic Mean among $a_i$ , and H is the Harmonic Mean among $a_i$ , and maybe we can apply some theorems relevant to these means.
 A: Let $$\sum_{i=1}^{n}{\frac{1}{x_i}}+\frac{n(n-2)}{\sum\limits_{i=1}^{n}{x_i}}<(n-1)(n-2)$$ for some values of $x_i$, $x_i=ka_i,$ where $k>0$ and
$$\sum_{i=1}^{n}{\frac{1}{a_i}}+\frac{n(n-2)}{\sum\limits_{i=1}^{n}{a_i}}=(n-1)(n-2).$$
Thus, $$\frac{1}{k}(n-1)(n-2)<(n-1)(n-2),$$ which gives $k>1$ and we obtain:
$$n-2=\sum_{i=1}^{n}{\frac{1}{x_i+1}}=\sum_{k=1}^{n}{\frac{1}{ka_i+1}}<\sum_{k=1}^{n}{\frac{1}{a_k+1}},$$ which is a contradiction because we'll prove now that $$\sum_{k=1}^{n}{\frac{1}{a_k+1}}\leq n-2$$ for any positives $a_i$ such that $$\sum_{i=1}^{n}{\frac{1}{a_i}}+\frac{n(n-2)}{\sum\limits_{i=1}^{n}{a_i}}=(n-1)(n-2).$$
Indeed, let $f(x)=\frac{1}{1+x}$ and $g(x)=f'\left(\frac{1}{\sqrt{x}}\right)=-\frac{x}{(1+\sqrt{x})^2}.$
Thus,
$$g''(x)=\frac{3}{2\sqrt{x}(1+\sqrt{x})^4}>0,$$ which says that $g$ is a strictly convex on $(0,+\infty).$
Now, let $\sum\limits_{i=1}^na_i=constant$.
Thus, $\sum\limits_{i=1}^n\frac{1}{a_i}=constant$ and by the Vasc's EV Method Corollary 1.6 it's enough to prove that $\sum\limits_{i=1}^nf(a_i)\leq n-2$
for equality case of $n-1$ variables.
Id est, it's enough to prove that:
$$\frac{n-1}{x+1}+\frac{1}{y+1}\leq n-2,$$ where $x$ and $y$ are positives such that
$$\frac{n-1}{x}+\frac{1}{y}+\frac{n(n-2)}{(n-1)x+y}=(n-1)(n-2)$$ or
$$\frac{n-1}{x+\frac{(n-1)(n-2)}{\frac{n-1}{x}+\frac{1}{y}+\frac{n(n-2)}{(n-1)x+y}}}+\frac{1}{y+\frac{(n-1)(n-2)}{\frac{n-1}{x}+\frac{1}{y}+\frac{n(n-2)}{(n-1)x+y}}}\leq\frac{(n-2)\left(\frac{n-1}{x}+\frac{1}{y}+\frac{n(n-2)}{(n-1)x+y}\right)}{(n-1)(n-2)}$$ or
$$(x-y)^2x(2nxy+(x-y)^2)\geq0$$ and we are done!
