I really don't know how to solve this problem. I just know that if $|a|=2k_1+1$ and $|b|=2k_2+1$, then,
$a^{2k_1+1}=e=a^0$ and $b^{2k_2+1}=e=b^0$. Also, if $|G|=n$, then, $2k_1+1,2k_2+1\equiv 0 \pmod n$.
I really don't know how to solve this problem. I just know that if $|a|=2k_1+1$ and $|b|=2k_2+1$, then,
$a^{2k_1+1}=e=a^0$ and $b^{2k_2+1}=e=b^0$. Also, if $|G|=n$, then, $2k_1+1,2k_2+1\equiv 0 \pmod n$.
On
If $x$ commutes with $y$, then x commutes with every power of $y$: by induction, we have that if $xy^k=y^kx$, then $$xy^{k+1}=(xy^k)y = (y^kx)y = y^k(xy) = y^k(yx) = y^{k+1}x.$$ And if $x$ commutes with $y^k$, then it commutes with $y^{-k}$: from $xy^k=y^kx$, multiplying by $y^{-k}$ on both sides we get $y^{-k}x = xy^{-k}$.
If $a^2$ commutes with $b^2$, then it commutes with every power of $b^2$.
If $b$ has odd order, then $b$ is a power of $b^2$.
You got it the other way round. It's $n \equiv 0 \pmod{2k_1 + 1}$ and $n \equiv 0 \pmod{2k_2 + 1}$.
Suppose $a^2b^2 = b^2a^2$. Then: \begin{align*} ab &= a^{2k_1+1}(ab)b^{2k_2+1} \\ &= a^{2k_1+2}b^{2k_2+2} \\ &= (a^2)^{k_1+1}(b^2)^{k_2+1} \\ &= (b^2)^{k_2+1}(a^2)^{k_1+1} \\ &= b^{2k_2+1}(ba)a^{2k_1+1} \\ &= ba \end{align*}