What happens when 0.02 mole NaOH is added to a buffer solution?
The second solution using the Henderson-Hasselbach equation is correct. While buffer solutions change pH very little near the pka of their constituent weak acid, it would not be correct to say that they do not change at all. Also, an addition of 20 mmol of NaOH is not insignificant to a 100 mM buffer—a 20% change in concentration. The Henderson-Hasselback equation in the form you've shown is an acceptable estimation of the buffer pH in a moderately concentrated buffer with an acid/base ratio close to 1. Deviations from it in that form can occur for very dilute or concentrated solutions or if it's well away from the pka.