Importance of initial and final states as intermediate states in two-photon spectroscopy of polar molecules