It's also worth noting that what you really need is a newer computer. You should always reckon on buying a replacement every four years or so -- if you get anything more than that out of it, that's icing on the cake.
It's also worth noting that "replacing" Photoshop CS4 with the very latest version (not that that machine would run it, mind) would cost a whopping $10 per month. And you get Lightroom and other lesser stuff with that. Not what I'd call "ridiculously expensive."
QuarkXpress will be pricey to replace if you have to, that's true. Your current version might still run however.
In either case you need to upgrade that OS version and probably that machine ASAP for security reasons if nothing else. Really not safe to have 10.4 on the web, and 3GB max is crippling Photoshop. Once you get on the newer OS, you might actually consider replacing it with Pixelmator, depending on your use. That said, CS4 should run in Yosemite -- I've gotten CS3 to run on my machine, though I have moved on to CC.
I suggest you do what I did: buy a mid-2012 MacBook Pro. It's a very upgradable model, it can handle up to 16 GB of RAM, you can put an SSD into make it superfast if you want, and it will run the latest everything. You might be able to find a good deal on one, although frankly you could probably get away with a recent Mac Mini, which a brand-new one probably sells for not much more -- maybe even less if you bought refurbished.