Here is the problem:
$ 445^{445} + 225^{225} \pmod{9}$
I found out that for $ 445^{445} \pmod{9} = 7$.
but for $ 225^{225} \pmod{9}$ when I do this:
$ (225 \bmod 9)^{225 \bmod 8}$ for the first equation I have $0$ mod.
What should I do?
Here is the problem:
$ 445^{445} + 225^{225} \pmod{9}$
I found out that for $ 445^{445} \pmod{9} = 7$.
but for $ 225^{225} \pmod{9}$ when I do this:
$ (225 \bmod 9)^{225 \bmod 8}$ for the first equation I have $0$ mod.
What should I do?
As $4+4+5\equiv4\pmod9\implies445\equiv4\pmod9$
$$\implies445^{445}\equiv4^{445}$$
As $9$ is not prime, we need to use Euler's Totient Function.
$$\phi(9)=6,445\equiv1\pmod6\implies4^{445}\equiv4^1\pmod9$$
and
$$225\equiv0\pmod9\implies225^n\equiv0$$
Since $225 \equiv 0 \mod 9$, one has $225^n \equiv 0^n \equiv 0 \mod 9$ for $n \ge 1$, so every positive power of $225$ is also $0$ modulo $9$.
To see this more intuitively for this particular case: $225 \equiv 0 \mod 9$ just means $9$ divides $225$. Then of course $9$ also divides $225^n$.
On the other hand to reduce the exponent modulo $8$ is not correct. The modulus $9$ is not prime. So this is not a situation where you can apply Fermat's little theorem. Instead, reduce modulo $\varphi(9)= 6$.
In light of this you should double-check your first result. As pointed out by others it is in fact not correct.
Hint $\ {\rm mod}\ 9\!:\ \color{#c00}{4^{\large 3}} = 64\equiv \color{#c00}{\bf 1},\ $ so $\,\ 4^{\large 1+3n}\equiv 4(\color{#c00}{4^{\large 3}})^{\large n}\equiv 4(\color{#c00}{\bf 1})^{\large n}\equiv 4$
Notes $\ 445 = \color{#0a0}{\bf 1}+3n\,$ since $\,{\rm mod}\ 3\!:\ 445\equiv 4+4+5\equiv\color{#0a0}{\bf 1}\,$ by $\,10\equiv 1\,$ (casting $3$'s)
Our calculation used standard Congruence Rules - here the Product and Power Rules.
You cannot apply little Fermat since the modulus $\,9\,$ is not prime. Instead you could use a generalization Euler's Theorem using $\,\phi(9) = 6\,$ to reduce the exponent mod $\,6.\,$