This is called a ground loop. Search on terms "ground loop" and check the faqs for advice on how to remove a ground loop.
My advice would be to not to use an inverter but instead try a car adaptor for the laptop that is DC powered and plugs into the cigarette lighter. Inverters - especially inexpensive ones, are known for introducing noise into the system.
The way to test if your inverter is the culprit is to run the laptop off of battery and remove the inverter from the system. If the sound improves, the inverter is certainly part of the problem.