You seem to be assuming that you can capture comets and recover water for free. In order to get oygen from H2O, you first have to supply energy. When you then use the oxygen to burn, you wind up with some CO2 and some H2O + enery.
H20 + energy => H (discard?) + 0
HnCm + O2 => H20 + C02 + energy (n,m = integers)
I don’t think you get any net energy out of this process, though I suppose you could use solar energy or atomic reactors to separate out the oxygen from the free water. I’m not too optimistic.
Just nudge the right one a bit closer to the Sun with a nuke.