Hint: Generally, when you want to prove that $o(a)=o(b)$ (assuming they're finite) in a group $G$, you show that
$$b^{o(a)} = a^{o(b)} = e$$
If you prove this, then it implies that $o(a) \mid o(b)$ and $o(b) \mid o(a)$. Since the order of an element is positive, that implies $o(a)=o(b)$.
Edit: As you figured, $(xax^{-1})(xax^{-1})=xa^2x^{-1}$. What happens exactly is this
$$(xax^{-1})(xax^{-1})=xa(x^{-1}x)ax^{-1}=xa(e)ax^{-1}=xa^2x^{-1}$$
If we calculate $(xax^{-1})(xax^{-1})(xax^{-1})$, we see the same pattern. Each time we multiply $xax^{-1}$ by itself, the term $x\cdot x^{-1}$ appears which is canceled. So, you can conclude that $(xax^{-1})^n=xa^nx^{-1}$.
Now, if you plug in $o(a)$ instead of $n$, you get $(xax^{-1})^{o(a)}=xa^{o(a)}x^{-1}=x(e)x^{-1}=e$. Hence, $o(xax^{-1}) \mid o(a)$. Conversely, $$xa^{o(xax^{-1})}x^{-1}=(xax^{-1})^{o(xax^{-1})}=e$$
$$xa^{o(xax^{-1})}x^{-1}=e \implies a^{o(xax^{-1})}=x^{-1}x=e$$
This shows that $o(a) \mid o(xax^{-1})$. Since they're both positive, $o(a) = o(xax^{-1})$
Can you handle the infinite case now?