Evaluation of quasidegenerate energy levels of two-electron configurations for multicharged ions