More generally, the following is called Titu's Lemma or Engel's form of Cauchy-Schwarz inequality:
For all $a_i\in\mathbb R$, $b_i\in\mathbb R^+$:
$$\frac{a_1^2}{b_1}+\frac{a_2^2}{b_2}+\cdots+\frac{a_n^2}{b_n}\ge \frac{(a_1+a_2+\cdots+a_n)^2}{b_1+b_2+\cdots+b_n}$$
Proof: by Cauchy-Schwarz: $$(b_1+b_2+\cdots+b_n)\left(\frac{a_1^2}{b_1}+\frac{a_2^2}{b_2}+\cdots+\frac{a_n^2}{b_n}\right)$$
$$\ge \left(\sqrt{b_1}\sqrt{\frac{a_1^2}{b_1}}+\sqrt{b_2}\sqrt{\frac{a_2^2}{b_2}}+\cdots+\sqrt{b_1}\sqrt{\frac{a_n^2}{b_n}}\right)^2$$
$$=(|a_1|+|a_2|+\cdots+|a_n|)^2\ge (a_1+a_2+\cdots+a_n)^2$$
with equality if and only if $\frac{a_1^2}{b_1^2}=\frac{a_2^2}{b_2^2}=\cdots=\frac{a_n^2}{b_n^2}$ and $(|a_1|+|a_2|+\cdots+|a_n|)^2= (a_1+a_2+\cdots+a_n)^2$, i.e. if and only if $\frac{a_1}{b_1}=\frac{a_2}{b_2}=\cdots=\frac{a_n}{b_n}$.