Hi Oksana!
Great question. In general, you can make a buffer whenever there is presence of weak acid and its conjugate base, or vice versa.
In the case of "B", CH3COONa is actually, CH3COO- and Na+. Remember that salts are spectator ions in buffer solutions, and not necessary to consider. Therefore, when you mix in HCl, you get exactly what you had wrote down: CH3COONa + HCl = CH3COOH + NaCl
Now think of it the way I just mentioned, you really have: CH3COO- + Na+ + HCl = CH3COOH + NaCl
Since you have both the weak base and its conjugate acid, you have a buffer in the making!
Hope this helps, and happy studying!
Molly