How do I fix the 3-5 second lag when typing with an Apple Bluetooth keyboard on a Windows 7 PC?
The frequency of 2.4 GHz Wi-Fi overlaps and can interfere with the Bluetooth frequency that is going to the keyboard to the Mac. 

Some PC have better response with this fix:

You just need to go into your Wi-Fi settings by going into the browser and entering the router's IP address (usually "192.168.1.1"). Enter the username and password when prompted. There should be a wireless setting for your wireless frequency, called 'channels' and normally is put the 'automatic' you just have to change that from 'automatic' to 'channel&nbsp;1' this should out your router to the lowest frequency. After saving the settings just to be sure turn off the router for 30 seconds and check your keyboard if it is working (may need a restart of the iMac and the keyboard). This should resolve the problem.