Modeling of the He-like magnesium spectral lines radiation from the plasma created by XeCl and Nd-glass lasers