My experience was different from what many are describing here. I just sat in my MS with ONE fob in my pocket, and chose DRIVER PROFILE SETTINGS from the profiles main menu. (It's at the bottom of the list, below Valet Mode). From there I selected my profile name from the drop down list. There was a blue option for Link with Fob 2, which I selected. It changed to Linked with Fob 2, letting me know the link was successful.
I then got out and walked away, letting my key fob lock the car.
I then got my wife's fob (leaving mine far away in the house) and returned to the car. went back to DRIVER PROFILE SETTINGS and this time selected my wife's profile. Again there was a blue option, this time saying Link with Fob 1. I selected that, and it immediately turned to a white Linked with Fob 1 message.
So far, operation has been flawless. It has nothing to do with whose fob is nearest the driver's door, or who is where, or how you unlocked. The car simply selects each time the profile linked to the fob which caused it to unlock. So if two fob carrying people approach the car together, or from different sides, it will unlock the car for the first fob it detects and selects the profile linked to that fob.
You can test this by standing at a distance and doubling clicking a fob to unlock- whichever fob you clicked on will summon its associated profile.
I find it interesting that the needed adjustments don't take place when the car unlocks- they begin when the door opens. Therefore, if my wife drove the car most recently, the seat and steering wheel start moving to my preferred positions only when I tug the door handle.