You need the model number of the G5 to make sure you have the correct tray.

Beware the G5 logic board. While you have it open, look at the board for bulging or leaking capacitors.
The capacitors should be completely FLAT at the top.

Anything other than flat is likely to cause you a world of grief

P