The following was an exercise to check if a group is trivial or finite. The group is given by $$G=\langle x,y : yxy^{-1}=x^2, xyx^{-1}=y^2\rangle.$$ Question: Is $G$ a trivial group? or finite group?
My attempt We must have that $x$ and $y$ should be of finite and odd order. For this, we first show that $\langle x\rangle=\langle x^2\rangle$. If this is not true, then $\langle x^2\rangle$ is a normal subgroup of $G$, being normalized by both $x$ and $y$. Hence if $\bar{G}$ denotes $G/\langle x^2\rangle$, then in $\bar{G}$, we have generators $\bar{x}$ and $\bar{y}$ with relation $\bar{y}\bar{x}\bar{y}^{-1}=1.$ Hence $\bar{x}=1$. This means $x\langle x^2\rangle=\langle x^2\rangle$. Hence $x.x^2=x^{2k}$ which implies that $x$ is of finite and odd order.
Similarly $y$ is of odd order.
How to proceed to get whether $G$ is trivial finite or infinite?
Observe that
$$\color{red}{x^2}=yxy^{-1}=y(xy^{-1}x^{-1})x=y(xyx^{-1})^{-1}x=yy^{-2}x=\color{red}{y^{-1}x}\implies x=y^{-1}$$
and from here that the group is the trivial one, since for example:
$$x^2=yxy^{-1}=yx^2\implies y=1\implies x=1$$