The Question
Suppose that $x$ and $y$ are elements of a group such that $$x^2 = y^2x^2y$$ and $$yx^{-1}y^2 = x^7.$$ Show that $x$ and $y$ commute.
Motivation
This came up in another question, where it was asked to establish that the presentation $$\langle x,y \mid x^2 = y^2x^2y, (xy^2)^2 = yx^2, yx^{-1}y^2 = x^7\rangle,$$ in which the second relation is redundant (pointed out by Derek Holt), is cyclic of order $24$. I was able to do so, but my argument used all three relations, and I was not able to come up with one that did not use the second, redundant relation. I tried, but without success, to do it with just the first and third relations, so I'd be interested in seeing such an argument if one can be had. (The remainder of the proof goes through just fine using only those two relations.)
(Note: The linked question may disappear; it is currently on hold.)
Let $G$ be the group in question. In $G$, we have:
$x^2 = y^2x^2y$ (1), and
$yx^{-1}y^2=x^7$ (2) $\Rightarrow y^2=xy^{-1}x^7$
Substitute in (1)
$x^2=xy^{-1}x^7x^2y \Rightarrow yxy^{-1} = x^9$ (3)
(3) $\Rightarrow yx^{-1} = x^{-9}y$, substitute in (2) to get $x^{-9}y^3 =x^7\Rightarrow y^3 = x^{16}$.
Since the element $y^3=x^{16}$ commutes with both $x$ and $y$, it is in the centre of $G$. Let $N = \langle y^3 \rangle$ and $H = G/N$. So $H$ is the group $G$ with the additional relations $y^3=x^{16}=1$.
But in $H$, we have from (3), $y^2xy^{-2} = x^{9^2} = x^{81} = x$, so $y^2=y^{-1}$ and $x$ commute and $H$ is abelian, and in fact $x^8=1$ in $H$ and $H$ is cyclic of order $24$.
But then, since $N \le Z(G)$ and $G/N=H$, $G/Z(G)$ is cyclic, so $G$ is abelian.