I see Microsoft looking at these two like this:
1) Nokia wants to make Android handsets. By purchasing Nokia Microsoft will gain a solid handset manufacturer and eliminate some competition from the Android marketsphere. Not that it will make much of a dent, but every penny counts...
2) RIM really wants to be Microsoft's handset maker. Microsoft knows it. The corporate world is still a massive profit system for Microsoft and the corporate world can easily connect the Blackberry to their internal email system. And since a lot of IT departments still will not update policies to allow iPhones or Android handsets, Microsoft can bribe companies to stick with Exchange or use it if it's a new company, by giving out mobile email devices that can also substitute as cell phones.
*) Then again, this is Microsoft. The company known for not giving us choice might not want a choice itself. It might decide to do both. Purchase both companies and move forward.