On both systems it will depend on how you have the bios setup.
For most any Sata based hard drive, in the bios the Sata mode should be set to AHCI mode.
You must also check the drive to see what version of Sata port the drive works with.
Sata 2.0 or 3.0 interface.
Some drives are not backwards compatible from a Sata 3.0 port specification to a 2.0 specification.
And must be connected to the right specification of Sata port to be seen.
If the drive connected to your system is not seen in windows explorer in the drive listings from C: to Z:
Use create and format hard disk partitions, program with in windows.
Click on the search bar of windows.
Type: Disk man.
And select the search result, by a left mouse click to the upper left.
Click on action at the top of the new window.
And click on the option of re scan drives.
Look down the list of drives to see if the new 500Gb you connected to you system is listed.
If you can see it look to the left to see the status of it, it should be listed as on line.
Look to the right and it will tell you if the drive has been formatted.
If it does not list a file system or Fat32, Ntfs, or Gpt.
But says Raw, it is the reason why it does not currently show in windows explorer when looking for the drive connected to your system. The drive is not formatted to a file system windows can work with.
You must right click on the window and select format.
choose Ntfs, Right click on the left most box if the drive does not say on line, and from the pull down list select on line.
After that, The drive should be listed with it`s storage capacity and the file system Ntfs.
And should then show in windows explorer of the computer.
If it does.
Take the drive out of your system.
Put it back in your friends system.
Go into the bios of his motherboard and make sure that the Sata interface is enabled.
And the mode set for the Interface is Ahci mode.
I take it you connected the Sata data cable and power to the drive in your friends system and your own.
A good way to check if the drive is physically present when connected to a computer via the Sata data cable and with power connected is to look in the bios to see if it is detected.
By the brand name of the drive and the storage capacity.
Providing you have pre set the Sata interface to Ahci mode first.