It looks like YHOO shares never went back above $45B, though: https://www.businessinsider.com/yahoo-market-cap-over-time-2...
So when Yahoo’s remains changed to Altaba after selling that $4.5B Yahoo namesake and Yahoo Japan for $4B+ soon after, it was still a nearly $40B market cap company. Almost all of it being 16% of Alibaba.
Edit: Apparently they used to hold 30%, but sold half of that for peanuts in 2012.
Carol Bartz really screwed Yahoo over in its dealing with Alibaba. Yahoo had 2 seats on the 5-seat board of directors and Bartz couldn't be bothered to appoint directors to those. When she became CEO, Jack came to meet her and she dressed him down in front of his underlings: a big slap in the face to Jack. These two incidents made sure that he was as uncooperative as could be. He took Alipay out from under Yahoo and never informed Bartz.
Whatever you may say about Marissa Mayer, when she became CEO her first priority was to fix the broken relationship between Alibaba and Yahoo. She smoothed things over, and Jack let Yahoo keep the 15% stake, instead of asking for all of it back. She made Yahoo many billions with her moves.