X-ray cross section in helium for electron capture to excited states by C6+ and O8+ ions in the continuum distorted-wave approximation