This sounds like the transmission was having an issue, and they don't appear to be telling you the complete story. That may be an issue with Carmax or the dealer they took it to, hard to say without seeing the codes they pulled from the computers in the vehicle. If you have the opportunity to get out of this deal, I would seriously consider it, replacing a transmission on this vehicle will be very expensive in the event that is what is wrong, and chances increase greatly when you have symptoms like you experienced.
If you do decide to keep it, go to a Volvo Dealer and see if you can purchase a VIP Extended warranty from Volvo, it's the best available for your Volvo.