Make sure you are signed out from your own Apple account when you are trying to update, or iTunes will get "confused" about what you are trying to do. Then connect your friends
Iphone to the computer and iTunes should then find the phone and check for any updates. You may have to restore the phone to factory settings first, as it may have the first owner's original settings, such as games, apps, music, etc, and be signed into Facebook, emails, etc in the original person's name.