1. Keyboard directly to iMac, mouse to keyboard.
2. Pick the external drive you want the highest performance from - plug that directly into the iMac.
3. Plug a hub (powered or unpowered) in to the third port, and connect the printer and the other hard drive in to that.
As far as power consumption goes, (as in: electricity,) it doesn't really make a difference. The printer and hard drive (if the hard drive has its own power,) don't use USB power, so it doesn't matter, you won't over load even an unpowered USB hub. (You could plug the printer in to the second port on the keyboard if you really felt like it.)
From a computer performance perspective, the iMac G5 can handle the USB processing overhead just fine - adding a hub won't make a difference.
From the peripheral performance side, you need to know that each port on the back of the computer has a fixed amount of bandwidth, shared among all devices plugged in to it. So for best hard drive speed, you want hard drives plugged directly in to the computer if at all possible. If you plug both the printer and a hard drive in to one USB port through a hub, they will share that bandwidth. When you're not printing, you won't notice - the hard drive will have access to the full bandwidth. But when you are printing, access to the hard drive will slow down. (So if you don't mind the clutter of having the printer plugged in to the keyboard, that would actually be fastest - since you could then plug both hard drives directly in to separate on-computer ports.)