Calculating the pH of a 'buffer' solution?
Question: Determine the $\mathrm{pH}$ of the solution resulting when $\pu{100 cm^3}$ of $\pu{0.50 mol dm-3}$ $\ce{CH2ClCOOH}$ is mixed with $\pu{200 cm^3}$ of $\pu{0.10 mol dm-3}$ $\ce{NaOH}$.

I'm not sure what level of chemistry is OP's in, but the given solution for the question is for the chemistry students with appreciable knowledge of stoichiometry of chemical reactions and buffers. That's probably why OP seems so confused of the solution. The answer elsewhere explains to certain level but has not explore the total picture. Hence, I thought it would be beneficial to OP if I explain it a little further:
$\ce{CH2ClCOOH}$ is a weak acid (about 100 times acidic than acetic acid) with $K_\mathrm{a}$ of $1.3 \times 10^{-3}$ (which is $1.8 \times 10^{-5}$ for acetic acid). On the other hand, $\ce{NaOH}$ is a strong base, which reacts with strong or weak acids irreversibly. When add $\ce{CH2ClCOOH}$ and $\ce{NaOH}$ together, following reaction would take place:
$$\ce{CH2ClCOOH (aq) + NaOH (aq) -&gt; CH2ClCOONa (aq) + H2O (l)} \tag1$$
The net reaction is:
$$\ce{CH2ClCOOH (aq) + OH- (aq) -&gt; CH2ClCOO- (aq) + H2O (l)} \tag2$$
The acid to base mole ratio of the reaction is 1:1. However, added amounts of acid and base are: 
Weak acid, $\ce{CH2ClCOOH}$: $\pu{0.50 mol dm-3} \times \pu{0.100 dm3} = \pu{0.050 mol}$ 
Strong base, $\ce{NaOH}$: $\pu{0.10 mol dm-3} \times \pu{0.200 dm3} = \pu{0.020 mol}$
That makes $\ce{NaOH}$ the limiting reagent (recall your general chemistry knowledge). Thus, $\pu{0.020 mol}$ of $\ce{NaOH}$ reacts with $\pu{0.020 mol}$ of $\ce{\ce{CH2ClCOOH}}$ to give $\pu{0.020 mol}$ of $\ce{\ce{CH2ClCOONa}}$ or $\ce{\ce{CH2ClCOO- + Na+}}$, if you look at the net reaction.
The unreacted amount of $\ce{\ce{CH2ClCOOH}}$ in the mixture ($\pu{0.300 dm3}$ in total volume) is: $\pu{0.050 mol} - \pu{0.020 mol} = \pu{0.030 mol}$.
Therefore, the concentration of acid, $\ce{\ce{CH2ClCOOH}}$: $\frac{\pu{0.030 mol}}{\pu{0.300 dm3}} = \pu{0.10 mol dm-3}$
Simillarly, the concentration of salt, $\ce{\ce{CH2ClCOONa}}$ or $\ce{\ce{CH2ClCOO-}}$: $\frac{\pu{0.020 mol}}{\pu{0.300 dm3}} = \pu{0.067 mol dm-3}$
Since, $\ce{\ce{CH2ClCOOH}}$ is a weak acid, it would ionize in aqueous solution as follows:
$$\ce{CH2ClCOOH (aq) + H2O (aq) -&gt; CH2ClCOO- (aq) + H3O+ (aq)} \tag3$$
Suppose, $\alpha$ amount (in $\pu{mol dm-3}$) of $\ce{\ce{CH2ClCOOH}}$ ionizes at $\ce{\ce{CH2ClCOOH}}$, the equilibrium concentrations of $\ce{\ce{CH2ClCOOH}}$, $\ce{\ce{CH2ClCOO-}}$, and $\ce{\ce{H3O+}}$ are $0.10 - \alpha$, $0.067 + \alpha$, and $\alpha$, respectively.
$$K_\mathrm{a} = \frac{\ce{[H3O+]}\ce{[A-]}}{\ce{[HA]}} $$
$$\therefore \ \ce{[H+]} = \alpha = \frac{K_\mathrm{a} \times \ce{[HA]}}{\ce{[A-]}} = \frac{1.3 \times 10^{-3} \times (0.10  - \alpha)}{(0.067  + \alpha)} \approx \pu{1.9 \times 10^{-3} mol dm-3}$$
$$\mathrm{pH} = -\log\alpha = -\log (1.9 \times 10^{-3}) = 2.72$$
On the other hand this can be easily solved using the Henderson-Hasselbalch equation as directed in the other answer elsewhere:
$$\mathrm{pH} = \mathrm{p}K_\mathrm{a} + \log \left(\frac {\ce{[A-]}}{\ce{[HA]}}\right) = 2.89 + \log \left(\frac {0.067}{0,10}\right) = 2.72 $$