Given that Nokia is spending much, much more than even Apple who also makes their own OS (wasn't it $2 billion vs. $464 million over the same time period?), this could result in a net savings.
Nokia does have to stop the market share slide, however. They're not going to build an ecosystem overnight even with Microsoft's help
Why would Microsoft want to buy Nokia? They've always been about the software.