It wasn't worthless when he sold it, it's only worthless now because Musk saddled it with $13Bn of debt that he to service and tanked revenue. Twitter was definitely ~$20Bn company minimum when the deal actually closed.
Selling something worth $20bn for $44bn is still a pretty good trick, tho.