Sounds like perpetual motion. Yes, energy is released when H and O2 combine, but internal combustion engines typically don't do better than converting 30% of that into mechanical energy. And there are losses when using electrical energy to 'split' H2O.