To answer your last question first: No, Leopard 10.5.8 is as far as that Mac can go.
Everything now depends on whether you have the original install disks (which were probably Tiger) and the leopard install disk. Only if you have those: erase the hard drive completely, and re-install the operating system.
You will also need to reinstall the applications you need from their install disks.
The iMac G5 is not only over 7 years old, will not run any version of OS X after Leopard and runs the older PowerPC CPU instead of the newer Intel CPU's run on all Macs since 2006.
What does your boyfriend use a computer for; what are the most important applications he uses?
When my iMac G5's HD crashed in 2011, after replacing the power supply one year prior, I decided its time had passed and purchaed a Mac Mini and Display in August 2011.
You could call Apple with the model and serial number of this computer and they will provide original discs for a $17.95 replacement price; which is not a bad idea, if you ever hope to resell it someday, or donate it, as I did to my niece and nephew!
However the replacement discs are probably Panther and not Leopard. Since you are already at 10.5.8, not having a Leopard disc is not much of a disadvantage anyway, unless it crashes.
Wiping its hard drive (AFTER you back it up completely) and restoring Leopard and its files might show some improvement in speed, but you do not have a Leopard disc to restore. Apple no longer sells them and purchasing them on eBay is financially disadvantageous. There are other sources for acquiring Leopard on the internet but...
One thought might be disc defragmentation. After time, files get fragmented all over your hard drive, slowing it down.
You would have to find a defrag program that worked in the Leopard days. These programs are best run from an external drive so that 100% of your Mac hard drive is available for defrag'in.
I used to use iDefrag. You can contact them and see if they still sell a version for Leopard:
Is your use of Lightroom and Photoshop for commercial purposes or only hobby? What versions of Lightroom and Photoshop are you using?
Take a look at the new Mac Mini for $599 and runs Mountain Lion:
I would recommend a third party RAM upgrade, say from OWC:
And of course you would need to purchase a Display: I use the 22" Samsung and I never miss my iMac G5 anymore!
However, this raises a software upgrade issue, which for Photoshop can be costly.
If you are happy with the current versions of Lightroom and Photoshop, I would still recommend that you put most of your money into hardware and save up for later software upgrades.
The way to accomplish this is to install Snow Leopard Server into Parallels 8 on your new Mac Mini; which will provide the needed PowerPC emulator Rosetta, which your applications will require:
[click on image to enlarge]
Snow Leopard Server is now available from the Apple Store for $19.99 + sales tax & shipping: 1.800.MYAPPLE (1.800.692.7753). Apple Part Number: MC588Z/A (telephone sales only)
Parallels 8 is now available for a 40% discount for 3 more days with the $49.99 March 2013 MacUpdate 10 apps bundle:
Adobe now offers a freely downloadable version of Creative Suite 2 (CS2), which being PowerPC applications, can only run as I have shown in SLS in Parallels: