Used vehicle without warranty?

Hello dear foren reader, my wife (was really my wife) bought a car from a dealer. After 5 months the gearbox is broken and the vehicle had an accident damage that was not repaired properly. Now we have already invested a lot in the vehicle and do not want to plug in any more. We wrote to the dealer and asked him to take back the vehicle, but he refers to the “purchase contract for a used vehicle without guarantee”. Do we now make? Has anyone made a legal text or similar experience and can help us? For a quick answer I would be very grateful to you. Love greets from the wet Rüsselsheim Andreas