Therefore new B = 0.001 + 0.0001 = 0.0011 mols
and new A = 0.001 – 0.0001 = 0.0009 mols
New pH = 7.2 + log (0.0011/0.0009)
= 7.2 + log (1.22)
= 7.29
Note that the change in pH (up or down) produced by adding equivalent
amounts of strong acid or strong base are equal. This is only the
case when the starting pH of buffer is equal to the pKa of weak acid.

Note that change in pH produced by adding the same amounts HCl or NaOH
are greater in example 2 than in example 1. In example 1, pH
of buffer is at pKa of weak acid and the buffering capacity is maximum.
Also note that in example 2 the pH changes produced by adding acid and
base are no longer equal as was the case in example 1. This
will be true at all pHs except the pKa. The acid and base buffering
capacities are only equal when the pH = pKa.