Prove the inequality $\frac{k(k+1)}{2}\left(\frac{a_1^2}{k} + \frac{a_2^2}{k-1} + \ldots + \frac{a_k^2}{1}\right) \geq (a_1 + a_2 + \ldots + a_k)^2$

You can simply use the inequality of quadratic and arithmetic mean for $k$ elements $\frac{a_1}k$, $k-1$ elements $\frac{a_2}{k-1}$ etc. For the inequality between quadratic and arithmetic mean see e.g. Jensen inequality and Root-Mean Square-Arithmetic Mean-Geometric Mean-Harmonic mean Inequality at AoPS.

Arithmetic mean is $$a=\frac{a_1+\dots+a_k}{\frac{k(k+1)}2}.$$

Quadratic mean is $$q=\sqrt{\frac{\frac{a_1^2}k+\frac{a_2^2}{k-1}+\dots+a_k^2}{\frac{k(k+1)}2}}.$$

So from $q^2\ge a^2$ you get $$\frac{\frac{a_1^2}k+\frac{a_2^2}{k-1}+\dots+a_k^2}{\frac{k(k+1)}2} \ge \left(\frac{a_1+\dots+a_k}{\frac{k(k+1)}2}\right)^2$$ and $$\frac{k(k+1)}2 \left(\frac{a_1^2}k+\frac{a_2^2}{k+1}+\dots+a_k^2\right) \ge (a_1+\dots+a_k)^2.$$


Try considering instead the vectors $(\frac{a_1}{1},...,\frac{a_k}{\sqrt{k}})$ and $(1,...,\sqrt{k})$.