Let $G$ be a non-abelian group of order 27. Assume $x, y \in G$.
Prove that there exists a $z \in Z(G)$ such that $yx = zxy$.
HINT: Start by determining $Z(G)$. Consider the cosets of $Z(G)$.
I managed to come up with a solution to this, but I did it without the hint provided.
What I did:
I noticed that the commutator subgroup $G'$ of $G$ is a subgroup of $Z(G)$ since the center is normal in $G$. Then there exists an element $z \in Z(G)$ such that $z = yxy^{-1}x^{-1}$ for some $x, y \in G$. Then $zxy = yx$ as desired.
My attempt with the hint: Since G is a $p$-group of order $27 = 3^{3}$ so the center has order 3. i.e., $Z(G) = \{1, z, z^{-1}\}.$
I don't know how to proceed from here.