..............and we remember that #pH=-log_10[H_3O^+]# by definition.... and we must also write the following equation to show the 1:1 equivalence..........
#NaOH(aq) + HCl(aq) rarr NaCl(aq) + H_2O(l)#
#(a)# Unequal volumes of same concentration acid and base are added.....there is a #10*mL# excess of #0.310*mol*L^-1# sodium hydroxide solution in a NEW volume of #72.0*mL# solution........
#"Moles of NaOH(aq)"/"Volume"=(0.01*Lxx0.310*mol*L^-1)/(72.0*mLxx10^-3*L*mL^-1)=0.0431*mol*L^-1#
........with respect to #NaOH#.
#pOH=-log_10[HO^-]=-log_10(0.0431)=-(-1.37)#
#pH=14-pOH=14-1.37=12.6#
#(b)# This time an EXCESS of acid is added......
#"Moles of acid"=31.0xx10^-3*Lxx0.310*mol*L^-1=9.61xx10^-3*mol#
#"Moles of base"=21.0xx10^-3*Lxx0.410*mol*L^-1=8.61xx10^-3*mol#
And thus #[H_3O^+]=(1.00xx10^-3*mol)/(52xx10^-3*L)=0.0192*mol*L^-1#
#pH=-log_10[H_3O^+]=-log_10(0.0192)=-(-1.71)=1.71#
Are the respective #pH# values consistent with (i) an excess of base, and (ii) an excess of base? Enquiring minds want to know!
For the background to these calculations, see here for pH and pOH and here for buffers