You posted this in the OSX 10.4 forum but say you are running 10.5.8, not that it really makes a didfference in this particular situation.
Here's a bunch of links you can peruse, but some may be old:
Ejecting media in Mac OS X: Removing 'stuck' CDs/DVDs - http://www.macfixit.com/article.php?story=20041011075232575
Enter in Terminal (Utilities folder):
press the return key
A dozen ways to eject or unmount a recalcitrant CD or DVD - http://www.osxfaq.com/dailytips/08-2002/08-12.ws
Enable Eject Menu by opening the folder System/Library/CoreServices/Menu Extras and double-clicking the file "Eject.menu". An eject icon will appear in the menubar that can be used to close and open selected optical drive(s).