The best idea is for Mr.A and Mr.B to have a friendly chat with each other about who they think should get the global account. Then, depending on the results of that conversation, either Mr.A can rename his many accounts to some new, unique username; or Mr.B can rename his fr.wikipedia account and Mr.A can get the global name.
- What if Mr.B don't want to negotiate with Mr.A?
I think you should cross that bridge when you come to it.
I find Mr.B's lack-of-commitment to being evil disturbing. If wants to be bad, he should do it properly ... once more with feeling! For example, why couldn't Mr.B build a list of usernames who have not yet merged their global accounts, yet have a non-trivial number of edits (with some recent edits), register a user on another wiki with that same name, make about 10 edits, and repeat for 100,000 other accounts on many wikis. Then when contacted by a Mr.A he could offer to forgo his username for the tiny sum of $1 via PayPal as recompense "for inconvenience and psychological trauma caused by losing his online identity". Are you going to argue for a dollar? I wouldn't. Plenty of people pay much more that $1 to domain name squatters, and people can get quite attached to their usernames, and can want to "own" that name across all the projects. Assume 25% of people feel the same way, and you've got $25k via nefarious means. The easiest way to stymie this (in addition to the current captchas which slow down account creation) would be to prevent new registrations of a user name that is already used on another project but which has not done any account merging.
-- All the best, Nick.