Licensing for software is perhaps the most confusing part of computing. You should always assume that a license (the piece of paper with the product key and/or the jewel case that has the product key) is the "owner of the license". If you both live in the same household (i.e. mother, father, brother, sister) and you both can "touch" the license, then you can install it on both PC's.
If your friend doesn't live in your house....then you can't share it. I have the MS-Office 2013, it allows 5 devices to be installed. My wife and I share the license (3 computers, 1 laptop), but I can't give it to my daughter who doesn't live with us, even though I have one "extra" license.