I would always approach a car’s manufacturer in a case like this, if only because 90,000km is not, in my estimation, an acceptable distance for a transmission to last before it needs total replacement. That said, I wouldn’t hold my breath in this case because the vehicle is well and truly out of warranty.
The other people I’d be talking to would be the RACV. The club will be very concerned to hear that a car it inspected has had such a major malfunction and may have some consumer advice of its own. Then again, if the inspection was a full 18 months ago, then again, I don’t like your chances. But it’s got to be worth a shot.
The other thing that bothers me is that the vehicle is an ex-fleet car, probably a rental car, so despite a full service history, that has to rate as a chequered past. The other part of the problem is that the mechanical layout of the X-Trail makes some repairs very time-consuming, and that’s a great way to jack up the price of any repair work. If it does turn out that you’re on your own, a second-hand gearbox from a wrecked X-Trail might be a better bet than a brand-new one.