Spectrometric method for detecting exoplanets as another test to verify the invariance of the velocity of light