Use the Henderson-Hasselbalch equation.
pH = pKa + log [(base)/(acid)]
Substitute pH and pKa and calculate the ratio of base/acid.
The second equation you need is
base + acid = 0.1 M
Those two equations solved simultaneously will give you concn acid and concn base, from there you can get to grams.
Post your work if you get stuck.
I should have given more info. I figured that I would use the H-H equation and the total conc., but what I don't get is why do I need two pka's.
I can get to the mass easily, but it seems that I could use either pka=7.21 or 12.67 with the base +acid =.1M.
potassium dibasic phosphate:
7=12.67 + log(base/acid)
(base/acid)=2.138x10^-6 subst. in (1)
Mass of base=2.13x10^-7 x (174.18g)=3.71x10^-5g
Now I can find the mass of the acid as well by substituting for the base, but how do I make use of kpa = 7.21, why do I need it?
I don't know that you do; however, the problem may be confusing you with the use of pKa (or I suppose it could be confusing me).
pK = 7.21 is pK2 for H3PO4 and
pK = 12.67 is pK3 for H3PO4.
I think you want to use pK2 for H3PO4 and I don't think you need the other one.
pK2 for H3PO4 is for buffers utilizing KH2PO4 and K2HPO4.
Draw a titration curve for H3PO4 vs KOH. You start with H3PO4. The first equivalence point is when all H3PO4 has been converted to KH2PO4. All intervening points on that curve are calculated with pK1 for H3PO4.
The second equivalence point occurs when all of the KH2PO4 has been converted to K2HPO4. The intervening points between the first and second equivalence point is calculated using pK2. The third equivalence point occurs when all of the K2HPO4 has been converted to K3PO4. The pH of points between the second and third equivalence points is calculated using pK3. After, the third equivalence point, of course, the pH is just excess KOH. Therefore, I think pK2 is the one you want and it is the 7.21.