Usually on attempted start up, you could get the computer to eject the install-restore DVD
by holding down the mouse button -- use a real USB mouse, if touch-pad is inconclusive.
The single-button mouse is best since it will just work (no guessing what button to hold.)
Also, by use of gravity to assist attempted install DVD removal, hold computer so that the
optical drive slot is facing downward.
If you had access to another older Mac with FireWire ports and a FW400 cable with the
same connector on both ends, to see if your failed iBook G4 could start in Target Disk
Mode (FireWire TDM allows access to non-boot data on the hard drive, if it works) then
the hard disk drive could be accessed by the other computer's Disk Utility and erased.
• How to use and troubleshoot FireWire target disk mode - Apple Support
There is a likelihood of the internal hard disk drive's failure is the main problem; though
some of these older iBook G4 models also developed other hardware failures. I have a
nice condition last model series iBook G4 12-inch that works fine, low time, needs battery.
Could also use a new SSD from macsales, they have legacy models for old ATA Macs.
Tedious labor and chances of breakage help make swapping hard drives a task in itself.
The noted iFixit repair guide for that series is recommended; and depending on which
one it is (they differ internally) the configuration of parts can be less a surprise. Either way
the job is a tough one, if the unit is to be restored without any additional damages from this.
Anyway, to be able to remove the install-restore DVD is a priority; and to attempt to get
FW Target Disk mode - so other computer to see & use it to erase the HDD in the iBook,
is another important consideration. If the iBook is in otherwise good shape, someone may
be interested in acquiring the computer, in trade for helping you remove the HDD data.
In any event...
Good luck & happy computing! 🙂