How?
The heat engine runs a generator.
The heat is converted to electricity.
You can't return what's no longer there. Or anywhere. It's no longer heat at all.
The "heat" has been converted and has gone out as "work".
How?
No it isn't. That is conservation of energy plain and simple. The Carnot limit contradicts conservation of energy.