The described method works, because the order of Z/100Z (as a ring) is phi(100). This means that the order of any element of Z/100Z is a factor of 40 and thus, g^40 = 1 for any member of Z/100Z.
You could also simply try to find the order of 3 (mod 100) by calculating
and thus derive that the order of 3 mod 100 is actually 10, and that you can thus remove any multiples of 10 from the exponent in question, once again leading you to 3^3 as your result. Takes a bit longer, but not that much longer, and takes less stuff you need to realize. This is probably how i would have done it.
Didn't we have a similar question a few pages back?