Pilot fish,
You seem to be digging for what to do with this.
In any situation where you exchange regs you should clear it before inhaling. Full stop.
You can do that by exhaling or by pressing the purge release. In either case (any case) you should form the habit of taking your first breath after that with your tongue touching the roof of your mouth. That works like the fender of a bicycle to keep any drops of water in the reg (or in the event of an upside-down reg potentially quite a bit of water) from shooting into the back of your throat. In addition you should make your first breath a little tentatively if you can. Gasping your first breath (any breath) greatly increases the chances of blowing drops of water to the back of your throat, which will make you start to cough.
Also, when receiving a regulator from your buddy it's the *receiver's* responsibility (in most systems) to acquire the reg and verify that the reg is in the correct orientation. It may not have seemed obvious at the time but it's taught like this from OW onwards.
R..