Skip to main content
1 of 7
Geoff Robinson
  • 44.4k
  • 5
  • 123
  • 169

Assuming you want that to hold for all $x,y \in G,$ any (non-Abelian) extra-special $2$-group $G$ will have that property. For there are only two squares in $G$: the identity, and the unique element of order $2$ in $Z(G).$ However, note that $(x^{p}y^{p})^{2}$ and $(y^{p}x^{p})^{2}$ are conjugate in $G$, so since they are both central, they are equal. By the way, it is easy to see that any finite group of odd order with the stated property is Abelian.

Geoff Robinson
  • 44.4k
  • 5
  • 123
  • 169