Contact Apple and request a 10.4 or possibly a 10.5 distribution disk for this system, if you've not obtained that DVD disk from the seller.
Boot and use that distribution disk to wipe the hard disk via Disk Utility, and to then reinstall OS X.
Best to start with a fresh installation of OS X, as that'll provide the default environment and not something that's been customized and extended by the previous owner.
The last OS X version that was supported for most PowerMac G5 systems was 10.5.8, and that would be preferable — if your Mac supports that.
If you're not sure which Mac you have, then use the > About This Mac from the menu and request more information on the system. You're looking for a model number listed there, and that'd be something like PowerMac7,3 or PowerMac11,2 for a ~2005-vintage PowerMac system. Whatever model number you have can then be used to determine the general specs for the configuration, and what the last version of OS X that was supported for the system.