I have the answer to this question but the book does not explain WHY this is a good buffer solution? It uses pH=pKa - log(base/acid) and shows 7.2=7.2 - log(1).

I don't understand why they can only use pKa7.2 and ignore the pKa 12.7.

You are instructed to prepare 100ml of a 0.02 M sodium phosphate buffer, pH 7.2, by mixing 50ml of 0.02 M Na2HPO4 and 50ml of 0.02 M NaH2PO4. Explain why this procedure provides an effective buffer at the desired pH and concentration.

Provided Table info:
H2PO4(-): Ka(M) 6.23x10^-8 pKa 7.2
HPO4(2-): Ka(M) 2.20x10^-13 pKa 12.7

First, a correction. The Henderson-Hasselbalch equation is pH = pKa + log (base)/(acid). That negative sign is either a typo in the book or by you in the post. What you are asking isn't exactly clear. I think you want to know why

a. is the solution a buffer
b. why it is effective
c. why use pk2 and not pK3?

a. The solution is a buffer BECAUSE you have an acid and its conjugate base.
b. Since 7.2 = 7.2 + log 1 (log 1 is zero) is 7.2, the most effective buffer is when pKa = pH. To get that you make (base) = (acid) and that ALWAYS makes (base)/acid) = 1 and that ALWAYS makes log 1 = 0 and that ALWAYS makes pH = pKa. Since base = acid, adding acid OR base affects the pH the same way so it is effective against BOTH acids and bases equally.
c. Why use pk2 and not pK3?
Look at k2 expression here.
H2PO4^- ==> H^+ + HPO4^2-
then
k2 = (H^+)(HPO4^2-)/(H2PO4^-)

Here is the buffer equation if a base is added.
H2PO4^- + OH^- ==> HPO4^- + H2O and here is the secret.
Note that k2 is the ONLY k expression (write out k1 and k3 expressions to see this if you will) that includes H2PO4^- and HPO4^2 and nothing else-. k1 for H3PO4 = (H^+)(H2PO4^-)/(H3PO4) and you don't have H3PO4 anywhere in that buffer. Also k1 = (H^+)(PO4^3-)/(HPO4^-) and you don't have PO4^3- anywhere in that buffer. You have only the salts NaH2PO4 and Na2HPO4 so k1 and k3 are not applicable. Get it?

To understand why the pH and pKa values are important in this buffer solution, let's break it down step by step.

A buffer solution is a solution that resists changes in pH when a small amount of acid or base is added to it. Buffers are typically made up of a weak acid and its conjugate base, or a weak base and its conjugate acid.

In this case, the buffer is made up of sodium phosphate, which can act as a weak acid (NaH2PO4) and its conjugate base (Na2HPO4). Sodium phosphate dissociates in water to form H2PO4(-) and HPO4(2-). The reaction can be represented as:

NaH2PO4 ↔ H+ + HPO4(2-) (1)

Na2HPO4 ↔ 2Na+ + HPO4(2-) (2)

Now, let's look at the Henderson-Hasselbalch equation:

pH = pKa + log([base]/[acid]) (3)

Where:
- pH is the desired pH of the buffer solution (in this case, pH 7.2).
- pKa is the negative logarithm of the acid dissociation constant for the weak acid.
- [base] is the concentration of the conjugate base.
- [acid] is the concentration of the weak acid.

In equation (3), the ratio [base]/[acid] plays a crucial role in determining the pH of the buffer solution. It tells us how much of the weak acid and its conjugate base are present in the solution.

Now, let's consider the specific case given in the question. We are asked to prepare a 0.02 M sodium phosphate buffer, pH 7.2, by mixing 50 ml of 0.02 M Na2HPO4 and 50 ml of 0.02 M NaH2PO4.

Since both solutions have the same concentration (0.02 M), the ratio [base]/[acid] in equation (3) will be 1. This means that the concentration of HPO4(2-) will be equal to the concentration of H2PO4(-) in the buffer solution.

Now, let's verify if this ratio satisfies the desired pH value of 7.2. Substituting the values into equation (3), we get:

7.2 = pKa + log(1)

Since log(1) equals 0, the equation simplifies to:

7.2 = pKa

In other words, the desired pH of 7.2 can only be achieved if the pKa value of the weak acid matches the pH value. In this case, the given pKa value of 7.2 matches the desired pH, so the buffer solution can effectively resist changes in pH.

Now, why can we ignore the pKa value of 12.7? The pKa value of 12.7 corresponds to the dissociation of HPO4(2-) to form H+ and PO4(3-). This dissociation does not play a significant role in the pH range of 7.2. At pH 7.2, most of the phosphate species will exist in the form of H2PO4(-) and HPO4(2-).

Therefore, only the pKa value of 7.2 needs to be considered because it determines the equilibrium between H2PO4(-) and HPO4(2-) in the buffer solution.