Let $G$ be a group generated by two element $g$ and $h$. Let $e$ denoted the identity element of $G$ . Suppose
$g^4=h^7=ghg^{-1}h=e$
$g^2\neq e$, $h\neq e$
without repetition, write down every element of $G$ which is of the form $k^2$ for some $k\in G$. Express each answer in the form of $e,g^m,h^n$ or $g^mh^n$, where $m,n$ are positive integers.
I am very confused about this question, could anyone help me? Thank you so much.
Hints:
We have $ghg^{-1}=h^{-1}$, taking inverses, $gh^{-1}g^{-1}=h$, and thus $hg=gh^{-1}=gh^6$.
So, every element can be written as $g^nh^m$ with some $n,m\in\Bbb N$.
Calculate and reduce $(g^nh^m)^2$.