Suppose that $G$ is a group generated by elements $A$ and $B$, that is, every element of $G$ can be written as a finite "word" $A{ }^{{ }^{1}} B^{n_{2}} A^{n_{3}} \cdots B^{n_{k}}$, where $n_{1}, \ldots, n_{k}$ are any integers, and $A^{\prime \prime}=B^{\prime \prime}=1$ as usual. Also, suppose that $A^{4}=B^{7}=A B A^{-1} B=1, A^{2} \neq 1$, and $B \neq 1$.

(a) How many elements of $G$ are of the form $C^{2}$ with $C$ in $G$?

(b) Write each such square as a word in $A$ and $B$.

Let's think step by step and output the final answer within \boxed{}.
user