If we let x0 be the molarity of the NaAc (sodium Acetate) after adding the solid to 100 ml of water. We expect that the Ac- will react with the H+ of the HCl until a pH of 5 is reached. The equation for the equilibrium of the conjugate acid HAc is
HAc → H+ + Ac- which has a KA = 1.8 x 10-8
We can write the K expression in terms of x the molarity of Ac- that forms Acetic acid in order to reach equilibrium:
KA = [H+][Ac-]/[HAc] = [.15 - x][x0-x]/x
Note that .15-x = 10-5 (pH of 5) and x = .15 - 10-5
1.8 x 10-5 = 10-5 *(x0-x)/x or x0 = 2.8x which is approximately 2.8*.15 (sing 10-5<<.15) =0 .42 molar
If you want to make a .42 molar NaAc solution, you need 0.042 moles for 100 ml (one tenth of a liter, one tenth the moles)
Another way to do this is to use the Henderson-Hasselbalch equation with the understanding that the acetate will neutralize the HCl and that .15M HAc is formed:
pH = pKA + log([Ac-]/[HAc]) or the log term becomes log [x0-.15]/[.15 If you solve this you get the same value for x0