Problem. Let $p$ be an odd prime and $G$ be a non-abelian group of order $p^3$. Suppose there exists an element $x\in G$ of order $p^2$. Find an element $y\in G\setminus\langle x\rangle$ of order $p$.
It is true, by Cauchy's theorem or some other theorems, that $G$ has an element of order $p$. However, we are not sure whether it lies in $\langle x\rangle$ because $x^p,x^{2p},\ldots,x^{(p-1)p}$ all have order $p$.
I tried another approach: The number of element in $G$ of order $p^2$ must be a power of $$\varphi(p^2)=p(p-1),$$ where $\varphi$ is the Euler's totient function. There are $p^3-1$ non-identity elements in $G$. We have $$p^3-1=p(p-1)(p+1)+p-1=(p+1)\varphi(p^2)+p-1.$$ This also implies that $G$ has an element of order $p$, but the remainder $p-1$ is problematic as we already have $p-1$ elements of order $p$ above.
Does anyone have good ideas on this question?