It's possible that some shareholders would realize significant capital gains on that, and the taxes would offset part or all of the profit. But of course other shareholders would not only make a profit, but would also have a fat capital loss to go with it. It just depends on when they bought the shares and what they paid.
Overall, though, when one factors in all the tax effects, the market is assigning a negative value to Yahoo proper. Why? Because they, quite reasonably, assume that Yahoo proper will chew up the cash that's currently on the books and any that is obtained via asset sales. That is, should the shareholders ever receive a dividend of any kind, it is likely to be the current cash value of the company less some large fraction wasted between now and whenever that might hypothetically happen.
Bluntly, if the company were being valued as a going concern, the market would be pricing it a lot lower even than it is. The only reason for the share's relatively high price is the expectation that some kind of spinoff will happen to allow the shareholders to receive a larger fraction of the value of the company's assets than they would if the company sold those assets itself and used the capital to continue its own operations. In the latter event, one must reasonably assume the ultimate return to shareholders would be very close to zero (an eventual sale of the rotted carcass to private equity) or zero (bankruptcy).