Release an OS that will drive traffic to your [...] search engine where you can sell ads.
Not far removed at all. Google makes billions by selling ads. Even if they budget a couple of million $/year for this project (might be less, depending on how you structure the proejct), they'll be making crazy returns if this increases their ad revenue just by 0.001. Not to mention all the FUD it'll cause inside MS :)
Release an OS that will send more people to the internet, where your (profitable) search engine is.
Contextual advertising in an email client is VERY valuable. :)
Release an OS that will drive traffic to your spreadsheet app that will drive traffic to your search engine where you can sell ads.
*Gmail still doesn't really makes much money.