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-v-10-5-6-Leopard-Retail-10-5-Operating-System-DVD-in-Box-VGC-NR/323800675929?epid=128080869&hash=item4b64063659:g:iZoAAOSwxlxc0f4h