If NeXT had not bought Apple, because that was what actually happened, Apple would be gone by now.
Apple did buy out NeXT, but then Steve Jobs and his team took ownership over Apple key positions from inside.
A situation that happens quite often where the bought company, manages to own the buyer.
So on the paperwork and bank transactions, Apple bought NeXT, on management level, NeXT bought Apple.