Index of subgroup is 2 then for any $g$, $g^2$ belongs to subgroup If index of a subgroup $H$ is 2, then $g^2 \in H$ for every $g$ in G.
Proof:
Since index is 2, there are only two distinct cosets. Now if $g \in  H$ then it trivially holds because $H$ is a subgroup. Let  $H$ and $gH$ be cosets where $g \notin H$ therefore given any other coset which is of the latter form then it is equal to $gH$.
Hence,
$gH$=$g^{-1}H$
$g^2H=H$ $\implies g^2 \in H$
$\blacksquare$

Typically one shows that if $|G:H|=2$ then $H$ is normal in $G$. This follows directly since for $g\in G$ and $g\notin H$ we have $G = H \cup gH = H \cup Hg$ which implies $gH = Hg$. 
Therefore $G/H \cong \mathbb{Z}_2$ since there is only one group of order 2. Hence $g^2H = H$ for any $g$ which implies $g^2 \in H$.
