Use Fermat's Little Theorem to prove $24^{31} \equiv 23^{32} \mod{19}$ I'm trying to prove $24^{31} \equiv_{19} 23^{32}$.  
All I have so far is that this is equivalent to $23^5 \equiv_{19} 24^6$ by multiplying both sides by $24^623^5$.  I can see that there seems to be some trick about the fact that the bases and the exponents are each off from the other by 1, but I'm not seeing how to exploit that since I still don't want to have to compute $(23+1)^6$ in pretty much any way.
I searched around for any extra information and I saw one person on YouTube use a principle that you can divide an exponent's base by the module and take the remainder.  So for instance, if I'm understanding the principle, it would say that since 24's remainder on division by 19 is 5, and 23's remainder after division by 19 is 4, then this problem reduces to $5^6 \equiv_{19} 4^5$.  But I've never seen this principle until watching that YouTube video, so is this legit?

As $24\equiv 5$ and $23\equiv 4\mod 19$, this amounts to proving 
$$5^{31}\equiv 4^{32}\mod 19.$$
Furthermore, $5$ and $4$ are inverse to each other modulo 19, so multiplying both sides bt $4^{31}$, it is equivalent to 
$$4^{63}=2^{126}=(2^{18})^7\equiv 1\mod 19,$$
which is true by Little Fermat.
