Artificial intelligent assistant

An interesting puzzle for some, confusing for me Suppose that $a$ is of odd order $k$ and $bab=a$. I need to show that $b$, must be of order $2$. We can prove this anyway we want to, but our hint is to expand $(bab)^k$ and re-associate and then prove that $ab^2=(b^{-1})^2a$ "to collapse the expression in pairs." Alright since, $a$ is of odd order $k$, $k=2n+1$ for $n\in Z.$ So if we multiply $a$ by itself $k$ times we get $a^k=e$. And we know $bab=a$. What would be the next step here? Would I have to say that $(bab)^k=a^k=e$?

We have $$bab^{-1}=b^2a$$

So $$e=(bab^{-1})^k=(b^2a)^k=(b^2a)^{k-2}b^2ab^2a =(b^2a)^{k-2}a^2=\cdots =b^2a^k=b^2$$

xcX3v84RxoQ-4GxG32940ukFUIEgYdPy a682233fd01f0499ad86cb27f3ba6ef5