First of all, if you're collaborating during development then your friend should add you to his account as a developer and add your certificate to the development provisioning profile.
To do this he needs to invite you to his developer account, then you create your certificate. See Apple's App Distribution Guide
However, if you just want to use his identity, I would instead open his p12 file which will import it into your keychain. I don't think typing the path p12 into the Code Signing Identity works.
Make sure you've got the WWDR certificate installed, check the app bundleID matches that of the the provisioning profile, restart Xcode for good measure and then you should be able to select his code signing identity and sign your app.