I don't know the exact details of how it works. You don't gain an infinite amount of energy but think: Perpetual energy.
For an "engine" in the general "physics" sense of something that performs work:
Energy Output = Energy Input * Efficiency
...where efficiency is some value between 0 and 1 (exclusive). Efficiency can never be 1.
If you can manage to break that equation then you've developed perpetual motion... which is impossible because of that equation.
Oh, and depending on how you break that law, you might get anti-gravity, too.
At best, you can recover wasted energy by applying generators to slow the car during breaking or coasting down hill. Otherwise, it's like trying to charge one battery with another battery and hoping to keep both batteries charged.