Calculate the mass of alanine and the volume of HCl required to prepare 1 litre of 0.1mol/litre buffer with pH of 2

Use the Henderson-Hasselbalch e4quation and solve for base/acid ratio.

2.00 = pKa + log b/a
b/a = ?
Then a + b = 0.1M
Solve the two equations simultaneously and obtain (base) and (acid). Convert to volume HCl and g alanine. You will need the concn of HCl you have available; I assume you just didn't post that.