Theoretical study of X-ray photoelectron spectra of BN and SiC crystals