You need to clarify what part of the MAWP reduction calculation you didn't understand.
Simply put, Resultant Moment M and Axial Force W are converted into equivalent pressure Pm and Pr.
The sum of Pm and Pr is then subtracted from Flange MAWP (taking effect of Moment factor Fm) at the design temperature, thus resulting into De-rated MAWP.
Refer UG44(b) for actual formula regarding evaluation of external loads on a weld neck flanged joint.
You may also refer to Kellogg Equivalent Pressure Method if you want to dig up more on how the formula is derived.
The greatest thing Contact Stress has ever done is to make everyone believe it doesn't exist.