For illustration I will work out the pH of the buffer before acid is added.
Ammonium ions are weakly acidic:
#sf(NH_4^+rightleftharpoonsNH_3+H^+)#
For which:
#sf(K_a=([NH_4^+][H^+])/([NH_3])=5.6xx10^(-10)color(white)(x)"mol/l")#
#:.##sf([H^+]=K_axx([NH_3])/([NH_4^+])#
#sf(=5.6xx10^(-10)xx0.24/0.20=6.72xx10^(-10)color(white)(x)"mol/l")#
#sf(pH=-log[H^+]=-log(6.72xx10^(-10))=9.17)#
The buffer works by the base absorbing small amounts of added #sf(H^+)# ions. We can work out the number of moles of ammonia present in the buffer.
#sf(n_(NH_3)=cxxv=0.24xx0.05=0.012)#
You can see straight away that this is actually less than the number of moles of HCl added, which is 0.03, so the ammonia will not be able to cope with this amount of acid.
The reaction is:
#sf(NH_3+H^++rarrNH_4^+)#
So the moles of #sf(H^+)# left after addition will be :
#sf(0.03-0.012=0.018)#
All the ammonia will be converted to #sf(NH_4^+)# ions.
The initial moles of #sf(NH_4^+)# ions is given by:
#sf(n_(NH_4^+)=cxxv=0.20xx0.05=0.01)#
So the total moles of #sf(NH_4^+)# ions after addition of the acid will be:
#sf(0.01+0.012=0.022)#
Now we have a solution that contains 0.018 moles of #sf(H^+)# ions and 0.022 moles of #sf(NH_4^+)# ions. The #sf(Cl^-)# ions don't have any role here.
To find the pH I am going to ignore any #sf(H^+)# formed from the dissociation of #sf(NH_4^+)# or water as this is much smaller than the remaining #sf(H^+)# ions from the addition of HCl.
#sf([H^+]=n/v=0.018/0.05=0.36color(white)(x)"mol/l")#
#sf(pH=-log[H^+]=-log(0.36)=0.44#
I have assumed that the addition of HCl did not cause a volume change.
The acid added is beyond the buffer capacity.