OS X 10.5 can be installed on a G4 powerbook, I've done it on mine.
My guess is that the G4 you bought off Ebay has had something changed in it that OS X doesn't recognise.
If your buddy's copy of OS X 10.5 is legit, then take it and the G4 into your nearest Apple Store (if possible) and ask to see one of their genii, who should be able to help you.