This question stems from 2010 AMC 10A, Q24 solution given at AOPS.
If I understand right, we have a number N divisible by 4, but not by 25. And it is argued that since 'N mod 4 = 0', N mod 100 = N mod 25.
What is the general rule being applied here? Simply a and b being coprime seems insufficient.
The rule you are looking for is called persistence of remainders mod factors, combined with Chinese remainder theorem . A number that is 0 mod 4 can be :
$$0,4,8,12,16,20,24,28,32,36,40,44,48,52,56,60,64,68,72,76,80,84,88,92,96$$ mod 100 . A number that is 12 mod 25 can be: $$12,37,62,87$$ mod 100 they only intersect at 12 mod 100. In fact, Chinese Remainder Theorem says because 4 and 25, are coprime, that there exist just one intersection amongst any pair of remainders mod 4, mod 25 when looked at mod 100. Persistence mod factors just means any $$mx+c$$ is congruent to c mod a factor, when the slope is taken to be that factor of m. ADDENDUM: if $b<a$ and N mod a is divisible by b is one such condition( in this example, not overall). mod 100 the following work:$$\begin{array}{c|c|c}\bmod 25&\bmod 4&\bmod 100\\\hline0&0&0\\1&1&1\\2&2&2\\3&3&3\\4&0&4\\5&1&5\\6&2&6\\7&3&7\\8&0&8\\9&1&9\\10&2&10\\11&3&11\\12&0&12\\13&1&13\\14&2&14\\15&3&15\\16&0&16\\17&1&17\\18&2&18\\19&3&19\\20&0&20\\21&1&21\\22&2&22\\23&3&23\\24&0&24\\0&1&25\end{array}$$ which shows it's the case any time N mod ab is less than a