# How to calculate the pH of a buffer after HCl was added?

A buffer is made from $50~\mathrm{mL}$ of $1.0~\mathrm{M}$ benzoic acid, $K_a = 6.3\cdot10^{-5}$, and $50~\mathrm{mL}$ of $1.0~\mathrm{M}$ sodium benzoate.
a) Calculate the pH of this buffer

For this do I simply use $-\log(6.3\cdot 10^{-5})$?

b)Calculate the new pH when $0.010~\mathrm{M}$ $\ce{HCl}$ is added to $100~\mathrm{mL}$ of this buffer.

This one I do not understand.

For (a), the Henderson-Hasselbalch equation, $$\ce{pH} = \mathrm{p}K_a + \log([\ce{A^{-}}]/[\ce{HA}]),$$ comes in handy. Because your molarities and volumes of the acid and its conjugate base are equal, this indeed reduces to simply $\ce{pH} = -\log(6.3 \cdot 10^{-5})$.
For (b), the volume of $\ce{HCl}$ added is required, as the concentration of the solution alone is not sufficient information. The standard practice is to assume that $\ce{HCl}$ (being a strong acid) reacts fully with the conjugate base in your buffer solution to produce an equal amount of the conjugate acid (i.e., if $x$ moles of $\ce{A^{-}}$ are consumed by $\ce{HCl}$, $x$ moles of conjugate acid $\ce{HA}$ are produced). Therefore, you can use the Henderson-Hasselbalch equation to recalculate the $\ce{pH}$, subtracting the moles of $\ce{HCl}$ added from your conjugate base, and adding that some number of moles to your conjugate acid.