Correct is:
Mit den Ersparnissen habe ich es geschafft, mir ein Auto zuzulegen.
die Ersparnisse
»Mit« needs an object that is in Dativ case (ask: »mit wem?«). And since you never have only one Ersparnis, you must use Plural. Dativ Plural of »die Ersparnis« is:
den Ersparnissen
See also Ersparnis in Wiktionary
etwas schaffen
The verb »etwas schaffen« (»to make/manage something«) is transitiv, so you always have to tell what you made. In this case, you describe what you managed to do in an subordinate clause, but a subordinate clause is not an object. So schaffen still needs an object that describes what you made, and in this case you use es (it in englisch):
ich schaffe es
ich habe es geschafft
zulegen
The verb »zulegen« is reflexiv and transitiv, so it needs two objects. One is a Dativ-Objekt, that must be a personal pronoun, so it can be mir, dir, sich, uns or euch. Since we are talking about first person singular, it must be mir:
Ich lege mir etwas zu.
The other object tells what you take (the car), and this must be in Akkusativ case, which you did right.
Ich lege mir ein Auto zu.
The order of both objects is: 1. Dativ-Objekt (mir), 2. Akkusativ-Objekt (ein Auto). You use the same order in a subclause too.