That's not a very good accounting comparison.
If Microsoft had zeroed out their R&D last quarter, they'd have produced $12 billion in operating income. Your $35b figure includes a fluke quarter.
Microsoft's trailing four quarters figure, with R&D zeroed out, will jump to ~$47 billion once the present quarter is reported. Google's trailing four quarters figure will be similar, around ~$48 billion, assuming their present quarter is close to the prior three (which are at about $36b together, with R&D zeroed out).