# Calculations for making a buffer from a weak base and strong acid

How many moles of $\ce{HCl}$ must be added to $\pu{100 ml}$ of a $\pu{0.100 M}$ solution of methylamine ($\mathrm pK_\mathrm b = 3.36$) to give a buffer having a $\mathrm{pH}$ of $10.00$?

(The answer is supposed to be $\pu{8.1 mmol}$.)

My thought process:

First, I found the $\mathrm pK_\mathrm a$ of methylammonium ion:

\begin{align} \mathrm pK_\mathrm a(\ce{CH3NH3+}) &= 14 - \mathrm pK_\mathrm b(\ce{CH3NH2}) \\ &= 10.64 \end{align}

Substituting this into the Henderson–Hasselbalch equation

\begin{align} \mathrm{pH} &= \mathrm pK_\mathrm a + \log\left(\frac{[\ce{CH3NH2}]}{[\ce{CH3NH3+}]}\right) \\ 10.00 &= 10.64 + \log\left(\frac{\pu{10 mmol}}{x}\right) \end{align}

where $x$ is the amount of $\ce{HCl}$ that must be added. However, when I solve for $x$ I find $x = \pu{43.7 mmol}$, nowhere near the correct answer. What am I missing?

Since $\mathrm{p}K_\mathrm{a} + \mathrm{p}K_\mathrm{b} = 14$, you get $\mathrm{p}K_\mathrm{a} = 10.64$ for the methylammonium cation.
$\ce{HCl}$ protonates methylamine. The amount of methylammonium increases by the same amount methylamine decreases. So
$$\mathrm{p}K_\mathrm{a} = \mathrm{pH} + \log\left(\frac{[\ce{HA}]}{[\ce{A-}]}\right) = \mathrm{pH} + \log\left(\frac{x}{10~\pu{mmol} - x}\right)$$
lets you calculate the value $x$ of $\ce{HCl}$ needed to obtain the desired $\mathrm{pH}$.