Apple paid 400M to acquire NeXT, but NeXT's management ended up taking over the company. So really, NeXT paid -$400M to acquire Apple. It's like how Pixar acquired Disney for -$7.4B.
Software too. Mac OS X (and later, iOS) is a direct continuation of NeXT's NeXTSTEP and OPENSTEP OSes. Objective-C came to Apple from NeXT. All the Cocoa APIs used on the Mac come from NeXT, and the UIKit APIs used for iOS development are a direct descendant of them. The modern Apple contains very little of pre-1996 Apple but lots of pre-1996 NeXT.
Hah - ain't that the truth.