You may want a second opinion on this.
If you had 5 millimoles of the carboxylic acid then you must have titrated the rest of the COOH group with the 7.5 millimoles NaOH which leaves 2.5 mmoles NaOH to titrate the other acid group whatever that may be. You must have 10 mmoles of that still un-titrated (you had 10 millimoles of the original and that is gone but you still have 10 mmols of the other acid remaining. So you form 2.5 mmols of the salt, you have 10-2.5 = 7.5 mmoles of the other acid at pH 6.72.
6.72 = pK2 + log (B/A)
I would substitute 2.5 for base and 7.5 for acid (but check those numbers) and solve for pK2. I see that gives an answer between 5 and 8 which satisfies that part of the problem. Check my thinking.
Could you please explain want you typed:
*You must have 10 mmoles of that still un-titrated (you had 10 millimoles of the original and that is gone but you still have 10 mmols of the other acid remaining.
Are you saying I have 10 mmoles of each acid, if so how did you obtain 10 mmoles
Suppose you have 100 mL of 0.1M H2SO4. You titrate it with 0.1M NaOH.
It takes 10 mmols NaOH to neutralize the first H ion AND it takes 10 mmols of NaOH to neutralize the second H. So after you neutralize the first H you STILL have 10 mmols of H to neutralize. That's what I'm saying with the carboxylic acid + the other acid. After you've neutralized the COOH group you still have 10 mmoles of the "other" acid to neutralize. The only difference is that both H ions are listed together in H2SO4 but in your problem the COOH is one acid and there is another acid group separate from that. But it doesn't change the logic.