Two External Drives on iMac
Some USB drives (typically the smaller, more portable sizes that use 2.5" hard drives) draw their power over USB (called bus-powered). Others (typically the larger 3.5" ones) have an external power adapter.

If you have one with an external adapter, you should be fine plugging it in to whichever USB port you want. Bus-powered ones plugged into a USB hub (like that in your keyboard) with other devices may not have enough power to start up, or they may start up, but the connection will occasionally drop (you'll see the drive disappear from your desktop). However it's safe to at least try plugging it in to your keyboard and see if it works. If the drive doesn't show up, try directly connecting it to a port on the back of your iMac.

Ideally you'll plug both hard drives in to the USB ports on the back of your iMac (every iMac since 2006 has at least 3, sometimes 4), which ensures maximum power and bandwidth. If you're short on ports, you can also get a standalone USB hub, which you could plug your lower-powered devices into, in order to free up ports for your drives.