Projectile 1s-->2p excitation due to electron-electron interaction in collisions of O5+ and F6+ ions with H2 and He targets.