Computing $(3^{999^{100}} + 7^{960^{961}}) \bmod 225 $

Finding a number $a$ that satisfy $$3^{999^{100}}+7^{960^{961}}\equiv a\pmod {225}$$ is equivalent to solving the system $$\begin{cases}3^{999^{100}}+7^{960^{961}}\equiv a\pmod {9}\\\\3^{999^{100}}+7^{960^{961}}\equiv a\pmod {25}\end{cases}.$$ Edit: I add a proof of the above claim here. You can skip this if you know the proof.

To prove the equivalence, we consider the general case $$a\equiv b\pmod n$$ and let $$n=\prod_{i=1}^{m}{p_i}^{k_i}$$ be the prime decomposition of $n$. Since $n\mid a-b$ and ${p_i}^{k_i}\mid n$ for each of $i=1,2,...,m$, we immediately have ${p_i}^{k_i}\mid a-b$. This proves that the original congruence implies the system of congruences.

For the converse, suppose ${p_i}^{k_i}\mid a-b$ for each of $i=1,2,...,m$. That is, we assume the system of congruences holds. Using this theorem, since the prime powers are coprime, you can show inductively that the whole product divides $a-b$. That is, $$\prod_{i=1}^{m}{p_i}^{k_i}\mid a-b.$$ But the product is just equal to $n$. So $n\mid a-b$. This proves that the system of congruences implies the original congruence.

We now simplify each of the congruences. It is easy to see that $3^{999^{100}}$ is a multiple of $9$. Since $\phi(9)=6$, and that $960$ is a multiple of $6$, we have $7^{960^{961}}\equiv 7^{6n}\equiv 1\pmod {9}$, where $n=\frac{960^{961}}{6}$ is a positive integer.

For the second congruence, observe that $\phi(25)=20$, and $999^{100}\equiv (-1)^{100}\equiv 1\pmod{20}$, so $999^{100}-1=20m$, where $m=\frac{999^{100}-1}{20}$ is a positive integer. Then $3^{999^{100}}\equiv 3^{20m+1}\equiv 3\pmod{25}$. $960$ is a multiple of $20$. So $7^{960^{961}}\equiv 7^{20k}\equiv 1 \pmod{25}$, where $k=\frac{960^{961}}{20}$. We have arrived at the system $$\begin{cases}a\equiv 1\pmod {9}\\\\a\equiv 4\pmod {25}\end{cases}.$$ You can solve this by Chinese Remainder Theorem.


If you don't know Euler's theorem or CRT we still can compute it very simply. Notice

${\rm mod}\ 25\!:\,\ 3^{\large 3}\equiv 2\,\Rightarrow\, 3^{\large 9}\equiv 8\,\Rightarrow\, 3^{\large 10}\equiv -1\,\Rightarrow\,\color{#0a0}{3^{\large 20}\equiv 1},\ $ therefore

$$ \color{#90f}{3^{\large 20J-1}}\equiv \dfrac{(\color{#0a0}{3^{\large 20}})^{\large J}}{3}\equiv \dfrac{\color{#0a0}1^{\large J}}3\equiv \dfrac{-24}3\equiv\,\color{#90f}{ -8\!\pmod{25}}\quad\ $$

Therefore $\ 3^{\large 20J+1}\! = 3^{\large 2}(\color{#90f}{3^{\large 20J-1}}) = 9(\color{#90f}{-8+25n}) \equiv -72\pmod{9\cdot 25},\ $ and

$\qquad\quad\ \ \begin{align} {\rm mod}\ 9\!:\,\ 7^{\large 3}\equiv (-2)^{\large 3}\equiv1\\ {\rm mod}\ 25\!:\ 7^{\large 4}\equiv (-1)^{\large 2}\equiv 1\end{align}\,\ $ therefore $\,\ \color{#c00}{7^{\large 12}\equiv 1}\pmod{9\cdot 25}$

Combining yields $\ \ \bbox[10px,border:1px solid black]{3^{\large 20J+1}\! + \color{#c00}7^{\large \color{#c00}{12}K}\!\equiv -72+ \color{#c00}1^{\large K}\equiv -71 \pmod{9\cdot 25}}$

Remark $\ $ OP is a special case since its exponents have above form. Indeed

note $\,\ {\rm mod}\ 20\!:\ 999^{\large 100}\equiv (-1)^{\large 100}\equiv 1\ $ so $\,\ 999^{\large 100}\! = 20J+1,\ $

and $\,\ 12\mid 96\,\Rightarrow\,12\mid 960\,\Rightarrow\,12\mid 960^{\large 961}\ $ so $\,\ 960^{\large 961} = 12K$


Luckily, since $7$ and $225$ are coprime, you can use Euler's Theorem.

We can calcultate that $\phi(225) = 120$.

Thus, $$7^{960^{961}} = 7^{(8\cdot 120)^{961}} = 7^{120\cdot (8^{961}120^{960})}$$$$ = (7^{120})^{ 8^{961}120^{960}} = (7^{\phi(225)})^{ 8^{961}120^{960}} \equiv 1^{ 8^{961}120^{960}} = 1 \mod 225$$