MS offered $44B for Yahoo inclusive of their almost 50% stake in then pre-ipo Alibaba. At the time, Yahoo's investment in Alibaba was valued at more than their entire market cap (negative valuation for Yahoo's domestic operations, or negative value taking into account tax implications of divestiture of these assets, etc).
Yahoo turned down MSFT's offer. Yahoo then spun off its entire company, keeping the name Yahoo with this spin-off subsidiary. The parent company, now named Altiba, retained ownership of the stake in Alibaba. This is where the ~50B valuation remained.
The spin-off company (valued in the negative by the market) was then sold for $4.5B to Verizon. Altiba retained its $56B market cap during this time.
Yahoo, inclusive of Altiba, out-performed MS's offer. It was a far better deal for shareholders to turn down MSFT. The net value to shareholders exceeded $60B.
There were a lot of poorly written articles at the time, which confused the sale of the subsidiary (YHOO) with the previous offer (for both YHOO and what became AABA) so your confusion is understandable. But this perspective is simply wrong.