Nuclear shape evolution and shape coexistence in Zr and Mo isotopes