I am trying to use the theorem below to show that if $d_i=(m_i,p-1)$ then $\sum_ia_ix_i^{m_i}=b$ and $\sum_ia_ix_i^{d_i}=b$ have the same number of solutions. So far, I have been able to prove that if $d=(m,p-1)$ that the number of solutions to $x^m=a$ is the same as the number of solutions to $x^d=a$, but am having trouble getting to this next step.
Theorem: if $d=\gcd(p-1,n)$ then the number of solutions to $x^n=a$ in $F_p$ is equal to $\sum_{\chi^d=1} \chi(a)$