Yahoo! has three major assets: its stake in Alibaba (worth about $32B), its stake in Yahoo! Japan (worth about $8.5B), and its core internet business. Verizon would only be buying that last piece.
While it is fun to do the subtraction and see that Yahoo's core business is negatively valued, liquidating the Alibaba and Yahoo Japan assets would come at the expense of significant taxes, which I believe accounts for why shareholders value the firm the way they do. Still shocking how drastically small the core asset valuation is in comparison to a deal Yang struck years ago, but it might make the valuation make more sense.
Also, the simple subtraction ignores that the drag on Yahoo's value is debt. If Yahoo sold their stakes in Alibaba and Yahoo Japan the cash would presumably be used to pay off that debt. It is incorrect to tie all of the debt only to the core business.
That is just the "current" debt. They also have almost $15B in long-term liabilities, primarily $13.5B in deferred tax payments and $1.2B in general long-term debt.