Prove that $x$ has order $5$.

$a^{-1}x^2a=x^3 \implies a^{-1}x^4a=x^6 \implies a^{-1}x^6a=x^9$ but $x^6=x^3x^3=(a^{-1}x^2a)(a^{-1}x^2a)=a^{-1}x^4a \implies a^{-1}(a^{-1}x^4a)a=x^9 \implies a^{-1}a^{-1}x^4aa=x^9$ now using $a^2=a^{-2}=e$ we have $x^4=x^9$ so $x^5=e$ and because $5$ is prime $x=e$ or $x$ has order $5$.


Since there is an answer up, I would do $$ax^2a=x^3$$

$$x^2=a^2x^2a^2=ax^3a=x^3axa$$

$$axa=x^{-1}$$

$$ax^2a=x^{-2}=x^3$$

Leaving you with some bits to fill in.