Couldn't he take out a loan using his Tesla stock as collateral, and use that to fund a purchase of Twitter? That way he'd avoid selling any stock (and having to pay taxes on the sale), although he'd have to somehow fund the interest payments on the loan (which could be done through smaller stock sales, which would incur taxes, but he'd still pay less tax selling to fund the interest than selling to fund the principal.)
Rich people do this to buy yachts and sports cars (for I dunno, tens of millions), but borrowing $15 billion? I'm kinda skeptical any banks would bite here.
The collateral would be a huge portion of his Tesla stock, enough that a crash in TSLA could put the whole loan at risk.
To quote Oracle's 2021 definitive proxy statement, "As of September 13, 2021, Mr. Ellison, Oracle’s Founder, Chairman, CTO and largest stockholder, had pledged 317,000,000 shares of Oracle common stock as collateral to secure certain personal indebtedness". On that date, ORCL closed at US$87.91. So Larry Ellison had pledged approximately US$27 billion of ORCL stock to cover his personal loans. That doesn't tell us how big those loans actually are, but obviously the loan principal is in the billions not millions – it could easily be over US$10 billion. So if banks are willing to lend Ellison a few billion, why not Musk too?
Also, Musk may be able to find some co-investors (fellow billionaires, private equity, etc) who believe that Twitter would do better with a Musk-selected executive leadership team than with its current one, and so would be willing to support Musk in taking control.
Tesla could loan him money against his stock. Not only that, but he could repay the loan in stock. This was a very popular C-level perk at a bunch of companies.