Is it safe to solder headphone's cable that connected a pc by 3.5mm jack
These audio drivers have their own protection circuitry and you usually couldn't damage the main boards through the audio ports.

The noise could be due to the poor contact of you audio jack with the port of your computer or the cable itself where you soldered isn't done properly or the cable itself is damaged elsewhere.

EDIT:
General practice is to never work on anything while it's powered. Unless you really know what you're doing and have taken the necessary precaution steps.