I am having trouble with how to approach this problem. I have the solution but can't figure out how to get it.

How many moles of NaOH must be added to 1.0 L of 2.0M HC2H3O2 to produce a solution buffered at each pH?
a) pH=pKa
b)pH=4
c)ph=5

Read your textbook thoroughly.