The effect of the chemical environment of manganese and chromium atoms on the Kβ/Kα X-ray intensity ratio