Hi, have these sample problems. I used the Henderson-Hasselbach equation to solve them. And got the respective answers but i feel like i might have missed something.

You add 20 mL of 1 M sodium acetate to 10 mL of 2 M acetic acid, and fill it up with water to 1 L. What is the pH of the solution? Acetic acid has pKa of 4.76.
Answer: ph= 4.76
You add 5 mL of 1 M sodium acetate to 50 mL of 1 M acetic acid, and fill it up with water to 1 L. What is the pH of the solution? Acetic acid has pKa of 4.76.
Answer: ph= 3.76
I tried converting the mL and M to moles for both the questions and then plugged them into the HH equation.
thanks!

Your answers are correct. Technically, the HH equation uses concentration base/concentration acid which is mols/L base/mols/L acid. But you will notice that L is the same since it's the same solution so whatever the value for L happens to be it cancels and mols base/mols acid works quite well. Good job.