Transition wavelengths of muonic X-rays of magnesium, silicon and phosphorus