If every element of $H$ and $G/H$ is a square, then prove that so is every element of $G$.
Alternative proof. Apply the Snake Lemma to $$\begin{array}{c} 0 & \rightarrow & H & \rightarrow & G & \rightarrow & G/H & \rightarrow & 0 \\ & & 2 \downarrow ~~& & 2 \downarrow ~~ & & 2 \downarrow ~~ \\0 & \rightarrow & H & \rightarrow & G & \rightarrow & G/H & \rightarrow & 0 \end{array}$$
For each $g\in G$, There exists $a\in G$ such that $(aH)^2=gH$, which means that there exists $h\in H$ such that $g=a^2h$. Also, since there exists $h'\in H$ such that $(h')^2=h$, thus $$g=(ah')^2,$$ and the proof is completed.