$ \overbrace{15(15)^{\large 2n}}^{\large 15^{\:\!\LARGE 1\:\!+\,2n}\ \ }\!\bmod 40
= \color{#0a0}5(3(\!\overbrace{15)^{\large 2n}}^{\large (-1)^{\LARGE 2n}}\!\!\bmod 8)
= \color{#c00}{15}\,\ $ [so $\ 15^{\large 2k}\equiv 15(\color{#c00}{15})\equiv 25\,$ for $\,k>0\,$]
using $\ \color{#0a0}ab\bmod \color{#0a0}ac = \color{#0a0}a(b\bmod c) = $ mod Distributive Law (mDL) to factor out $\,\color{#0a0}{a = 5}$
Remark $ $ The CRT argument in fleablood's comment is essentially equivalent to the above. But - as above - the mDL is much easier to apply due to its operational form. This is explained further in the linked answer (see the "Linked" questions there for many more examples). Viewed inductively, mDL reduces the induction to the above trivial induction $\ (-1)^{\large 2n} \equiv 1\ $ (compare lulu's answer here).