How to prove this modular multiplication property to be true? I am watching a youtube video on modular exponentiation https://www.youtube.com/watch?v=sL-YtCqDS90
Here is author's work

In this problem, the author was trying to calculate $5^{40}$
He worked the powers of 5 by 2 until he go to the largest exponent that was less than 40, 32. He then reasoned that $5^{40}$ mod 7 =  $5^{32}$ mod 7 * $5^ 8$ mod 7. Does anyone know where he got this property from?  I know that there is an exponent property that would state $5^{40}$ = $5^{32}$ * $5 ^ 8$ (from
http://hotmath.com/hotmath_help/topics/properties-of-exponents.html ) but can someone show how to get from that one to the mod version property? I tried looking it up but couldn't find it.

That's the squaring step in the standard method of modular exponentiation by repeated squaring
$$\!\!\!\!\!\begin{align} a^{\large n}\ {\rm mod}\ m &\,=\, b\\ \Rightarrow\ \ \ a^{\large 2n}\ {\rm mod}\ m &\,=\, b^{\large 2}\ {\rm mod}\ m\end{align}\qquad $$
The proof is easy by converting to congruences - which are more convenient arithmetically 
$$\begin{array}{rrl} &a^{\large n}\ {\rm mod}\ m &\!\!=\ b\\ 
\Rightarrow&\ \     a^{\large n}\! &\!\!\equiv\ b\ \ \pmod m\\
\color{#c00}\Rightarrow&\ \     a^{\large 2n}\! &\!\!\equiv\ b^{\large 2} \pmod m\\
\Rightarrow&\ a^{\large 2n}\ {\rm mod}\ m &\!\!\!=\ b^{\large 2}\ \ {\rm mod}\ m\end{array}\qquad$$
where the $\rm\color{#c00}{red}$ inference employs the $ $ Congruence Power Rule for power $\,k = 2\,$ (squaring)
$$\qquad\qquad\ \  \begin{align} c &\,\equiv \, d\pmod m\\ \Rightarrow\ \ \ c^{\large k}\! &\,\equiv\, d^{\large k}\!\!\!\!\pmod m\end{align}\qquad $$
which is an inductive extension of the Congruence Product Rule $ $ (which could instead be used)
$$\qquad\qquad\ \  \begin{align} c &\,\equiv \, d\pmod m\\ \bar c &\,\equiv \, \bar d\!\pmod m\\ \Rightarrow\ \ \ c\bar c\! &\,\equiv\, d\bar d\!\!\!\!\pmod m\end{align}\qquad $$
The other inferences are standard conversions between mod as an operator and congruence, and their proofs are straightforward using the definitions.
Remark $\ $  Generally, as above, it is straightforward to prove properties of the mod operator by first converting to congruence form, then applying the arithmetical laws of congruences then, finally, converting back to operator form. While it is possible to perform such proofs without congruences, generally that will be messier, and less conceptual. 
