A lot of After Effect’s features lean heavily on your RAM, from previews to rendering to processing effects. Adding more RAM will definitely give you the best boost for your money in AE.
One thing to consider is that, while your particular processor speed may not be as big of a roadblock in AE, you will be held back by the slower bus speed, older/slower type of RAM and other issues that newer macs have improved upon. The mac pros add considerable horsepower beyond the simple gains of increased processor power, including increasing the speed and efficiency of what RAM you DO have. G5s are great, but upgrading to a Mac Pro should be on your horizon if you are feeling held back by your computer’s capabilities.