To simplify the notation I put $\sigma \circ \sigma ' =$ My attempt:
Suppose $\sigma \circ \sigma'$ is of order $k$, then $ (\sigma \circ \sigma ')^k =Id$. Suppose $(\sigma' \circ \sigma)^k \not = Id$, then we have: $$\color{blue}{(\sigma \circ \sigma ')^k} \circ \sigma \circ \color{red}{(\sigma' \circ \sigma)^k} \not = \sigma$$ Thus if we develop, we get:
$$\color{blue}{(\sigma \circ \sigma ') \circ \cdot \cdot \cdot (\sigma \circ \sigma ') } \circ \sigma \circ \color{red}{(\sigma' \circ \sigma) \cdot \cdot \cdot (\sigma' \circ \sigma) } \not = \sigma$$ By changing the place of parentheses, we get:
$$\color{blue}{(\sigma \circ \sigma ') \circ \cdot \cdot \cdot (\sigma \circ \sigma ') } \circ (\sigma \circ \color{red}{\sigma') \circ (\sigma \circ \sigma')\circ \cdot \cdot \cdot \circ (\sigma \circ \sigma') \circ \sigma } \not = \sigma$$ Which gives us:
$$\color{blue}{(\sigma \circ \sigma ')^k} \circ \color{red}{(\sigma \circ \sigma ')^k} \circ \sigma \not = \sigma \iff $$ $$ \sigma \not = \sigma $$
Which is absurd. Would this proof be correct? And sorry for the presentation, it's pretty hard to express what I want in latex.
Yes, you're correct. Essentially you're doing this:
The proof is almost the same as yours:
$$\begin{aligned} (ab)(ab)...(ab) = 1 \quad &\Rightarrow b(ab)(ab)...(ab)a = ba \\ &\Rightarrow (ba)(ba)(ba)...(ba) = ba \\ &\Rightarrow (ba)^{n+1} = ba\\ &\Rightarrow (ba)^n = 1 \end{aligned}$$
Another way of seeing this is that $ba = a^{-1}(ab)a$, so $ab$ and $ba$ are conjugate, they have the same order.