The expansion of spacetime is a global cosmological solution to a FLRW metric. It is not local.
Locally we solve GR by say the Schwarzchild solution. There is no expansion of spacetime here.
So the common answer is that your two objects are not expanding away from each other.
Cop out answer, right?
In reality the metric of the Universe cannot be approximated by these well known analytic solutions.
So there is probably an expansion of spacetime in the background so to speak but the effect is negligible. Sort of like the Earth's orbit shifting an atomic width over the lifetime of the solar system.
If we had a situation like your example 2) then the energy would have to come from whatever field was powering the exapnsion itself.
This brings me roundabout to a comment or two on the 'dark energy'.
What is it?
Is it a cosmological constant related to the vacuum energy density - maybe but the math doesn't add up by current theory.
Is it not constant but some new force a la quintessence models?
Is this quintessence a decaying field left over from inflation? Who knows.
Probably the biggest mystery in physics today is the nature of the dark energy. We have so little to go on - and I doubt it is solved soon.