Calculation of the position of spectral lines in the intermediate coupling approximation taking into account the interaction of configurations