$2.5 billion of that is charges related to the layoffs.
> - all their expenses are way up (cost of revenue 1B up, R&D expenses 2.3 B up, sales and marketing costs ~0.7 B up)
Likewise half of this (i.e. you're double counting). See the table on page 3.
> - ad revenue is down (that's 80-90% of all of their revenue)
78% is not 80-90%. It's impressive that you managed to quote a ridiculously large range, and still get it wrong, in a discussiong about the earnings report.
The ad revenue from Google properties, not from the display ad network, is up.