There are probably other ways to approach this question, but here's my attempt at a proof by induction. I'll skip the S(1) and S(k) steps for convenience and go on to S(k+1):

(a_1+a_2+...+a_k+a_{k+1})(\frac{1}{a_1}+\frac{1}{a _2}+...\frac{1}{a_k}+\frac{1}{a_{k+1}})\\=(a_1+a_2 +...+a_k)(\frac{1}{a_1}+\frac{1}{a_2}+...\frac{1}{ a_k})+a_{k+1}(\frac{1}{a_1}+\frac{1}{a_2}+...\frac {1}{a_k})+\frac{1}{a_{k+1}}(a_1+a_2+...+a_k)\\\leq n^2+(\frac{a_1}{a_{k+1}}+\frac{a_{k+1}}{a_1})+(\fr ac{a_2}{a_{k+1}}+\frac{a_{k+1}}{a_2})+...(\frac{a_ k}{a_{k+1}}+\frac{a_{k+1}}{a_k})+\frac{a_{k+1}}{a_ {k+1}}\\\leq k^2+2k+1\,\,$since$\,(\sqrt{\frac{x}{y}}-\sqrt{\frac{y}{x}})^2\geq 0\Rightarrow \frac{x}{y}+\frac{y}{x}\geq 2\\\leq (k+1)^2

Sorry, latex thing doesnt seem to be working