Chosen Solution

I’m trying to do a factory reset on this g5 model but it just keep bringing me to the install Mac OS X

There is no factory reset on a G5. You will need to boot from the original DVD installation disk or a retail 10.5 DVD. Like this: https://www.ebay.com/itm/Apple-Mac-OS-X-