Let $G$ a finite group and $H\leq G$, such that $|H| = \frac{|G|}{2}$. If $x \in G$ then $x^2 \in H$
My attempt:
As $x \in G$ then $\operatorname{ord}(x)$ divide $|G|$ this implies that $|G| = k\cdot \operatorname{ord}(x)$ with $k\in \mathbb{N}$
Moreover, we know that
$$\operatorname{ord}(x^2)=\frac{\operatorname{ord}(x)}{\gcd(2,\operatorname{ord}(g))}$$
Then:
$$\operatorname{ord}(x^2)=\frac{|G|}{k\cdot \gcd(2,\operatorname{ord}(g))}$$
Here I'm stuck. Can someone help me?