Limb Darkening and Rotation Broadening of Neutral Helium and Ionized Magnesium Line Profiles in Early-type Stars