Joe is on the hook for his mortgage and so his monthly cashflow must be higher to afford to live. However his net worth is larger and so he is richer.
This is why middle class people often feel poor than those who are poor: they make more money and have more in total, but they also have large bills and if something happens those bills will catch up with them fast.
Net worth isn't equity - mortgage + 401k. Net worth is assets - liabilities. Equity is not an asset; the house is. So is the 401k. The mortgage is a liability. So Joe's net worth is 100k (IRA) + 300k (value of house) - 200k (mortgage) = 200k positive net worth.
(Another way of thinking about equity, specifically, is it is the real estate contribution to net worth, because it is what is left when you subtract the real estate liability (mortgage) from the real estate asset (value of house). That's why you shouldn't subtract the mortgage from the equity: equity is what's left after you've already subtracted the mortgage.)
(Edit: Adjusted sign in first equation to subtract mortgage. It's probably more technically accurate to keep it as addition and consider the mortgage to be a negative value, but I believe it's more straightforward and intuitive for most people as it is now represented.)
Joe has a 300k house with 100k equity and 200k mortgage. He has 100k in stocks in a 401k. Net worth negative 100k.
Pete has $300 in his cheques account, and isn't eligible for loans or mortgage. Net worth positive $300
Obviously Joe is richer than Pete though.