Do not format the drive before you use it.

It comes formatted as FAT32 which is good for both the Mac and the PC.

COPY (heed Bob's warning) the files from the PC onto the WD.
On completion, disconnect the WD.
Connect to the iMac and COPY the files onto the iMac.

Once you are happy that you have everything on the iMac, you can go ahead and format the WD as OS X Extended(Journaled) and use it for your Time Machine backup.

P