It sounds as if the copy of Windows 7 is an OEM licensed copy from an HP machine. This will have been 'legally' and probably technically locked to the original machine, and cannot be used on another computer.
This is why OEM licence versions of software are cheaper than full retail copies. They are single use, once you are done with the computer, you throw away those licenses with the computer. Begging to Microsoft over the phone can sometimes get around this, if the reason for the replacement of the computer is through some unavoidable circumstances, like the old one blew up, your house burned down, etc. But they are not obliged to do so.
So if the HP is now a dead machine, then in essence the licenses that came with it are too.
Removing the hard-disk from the HP and putting it in the Sony and expecting it to work is a tad fanciful I'm afraid too. It might do something, but I suspect it will be more problematic than its worth. For a start the disk will be crammed full of drivers and software specific to the HP, that the Sony will baulk at, especially the drivers. If the CPUs are very different, i.e. AMD and Intel, or even different classes of CPU in a single brand, the kernel of the operating system which is set at installation time, is probably not going to work, i.e. you get the famous Blue Screen Of Death (BSOD).
Copying software from one disk to the other is also doomed to failure except for the simplest of software. Copying the files does not copy the data from the registry, which instructs Windows on how to use the software, but also you'll probably leave behind some other library files that are put into system folders not directly associated with the the application's folder. This is what installers do, they unpack the applications and put all the bits and pieces where they are supposed to go, and update the registry. They don't simply copy a bunch of files from the installer disk to the hard disk.