Let $G$ be a group and $x,y$ two elements from $G$. Suppose that $\langle xy \rangle = \langle yx \rangle$ , i.e. they generate the same subgroup of $G$. I want to find a counterexample in which $xy \neq yx$ and $xyyx \neq 1$. Maybe in a permutation group such a counterexample exists, but I haven't found one yet.
A counterexample for $xy \neq yx$ can be easily found in dihedral group $D_6$, for example $x=\rho^2\sigma$, $y=\rho\sigma$, where $\sigma^2=\rho^6=1$, but, in this case, $xyyx=1$.
Thank you in advance!
Say $xy = z$. Then asking $\langle z \rangle = \langle xy \rangle = \langle yx \rangle$ is the same thing as asking $yx = z^k$, where $k$ had better be coprime to the order of $z$ (do you see why?).
Then you are asking for a group with elements $x$ and $z$ so that
Given such elements, we can set $y = x^{-1}z$, as then $xy = z$ is obvious, and $yx = x^{-1}zx = z^k$.
If $k \neq 1$ then we'll know $xy = z \neq z^k = yx$.
If $k \neq n-1$, then we'll know $xy = z \neq (z^k)^{-1} = yx$, and so $xyyx \neq 1$.
This leads us to a group $G$ with presentation
$$\langle x, z ~|~ x^{-1}zx = z^k, z^n = 1 \rangle$$
Ideally we'd get a finite group at the end of the day, so let's assert $x$ has finite order too.
$$\langle x, z ~|~ x^{-1}zx = z^k, z^n = 1, x^m = 1 \rangle$$
This group looks like two cyclic groups $\langle x ~|~ x^m = 1 \rangle$ and $\langle z ~|~ z^n = 1 \rangle$ that have been "glued together" in such a way that $x^{-1}zx = z^k$.... Luckily there's a construction called the semidirect product which exists precisely for gluing groups together in this way!
Then our group is $C_m \ltimes_k C_n$, for (almost) any $m$ and $n$ we like. For technical reasons we need $m \mid n-1$ if we want to get a real group out the other side. Here the action is given by $x^{-1}zx = z^k$ for any $k \neq n-1$ (this requirement ensures $(xy)(yx) = zz^k \neq 1$).
By $C_m \cong \mathbb{Z}/m$, I mean the cyclic group of order $m$ where we write our elements as $x^i$ (or $z^i$ for $C_n$) instead of integers.
This may not be a super satisfactory answer (since it's not the kind of group that one meets in an introductory group theory class), but hopefully this shows the kind of strategies which one might use to build these examples for yourself. As a (fun?) exercise, you should chase through the definition of a semidirect product and make sure you understand the multiplication table for some small choices of $m$, $n$, and $k$.
For instance, what are the group elements of $C_3 \ltimes_3 C_7$? It's a group of size $21$, so it's reasonable to get your hands on it. What is the group multiplication? Good luck!
I hope this helps ^_^