What is a pH of 20 mL of 0.08 M NH3 added to 40 mL of 0.04 M HCl?

NH3 + HCl = NH4+ + Cl-

c(NH3)=(0.02L * 0.08M)/0.06L= 0.02667 M
c(HCl)=(0.04L * 0.04M)/0.06L= 0.02667 M
c(NH4+)=c(HCl)

Kb=[NH4+][OH-]/[NH3]
Kb=1.76*10^(-5)

So i tried to calculate it like this:
Kb=[OH-]
pOH=4.7545
pH=9.2455
But i know this is the wrong way, i just don't understand problems with buffers that well.

But your problem with this problem is this isn't a buffer. Since you have the same molarity for HCl as for NH3, then you have NH4Cl (the salt) BUT no acid or base to go with it to make a buffered solution. What you have instead is the salt (by itself) in water so this is a hydrolysis problem and the pH is determined by the hydrolysis of the NH4^+.

..........NH4^+ + H2O ==> H3O^+ NH3
I.......0.02667............0.....0
C..........-x..............x.....x
E.......0.02667-x..........x.....x

Ka for NH4^+ = (Kw/Kb for NH3) = (x)(x)/(0.02667-x) and solve for x then convert to pH.

To determine the pH of the solution formed by adding 20 mL of 0.08 M NH3 to 40 mL of 0.04 M HCl, we need to consider the reaction that occurs between NH3 and HCl:

NH3 + HCl --> NH4+ + Cl-

Since NH3 is a weak base and HCl is a strong acid, the reaction proceeds to completion, meaning all of the NH3 is consumed and converted to NH4+ ions. The resulting solution will contain NH4+ ions and Cl- ions.

First, let's calculate the initial concentrations of NH3 and HCl in the solution:

c(NH3) = (0.02 L * 0.08 M) / 0.06 L
= 0.02667 M

c(HCl) = (0.04 L * 0.04 M) / 0.06 L
= 0.02667 M

Since the final concentration of NH4+ will be the same as the concentration of HCl, c(NH4+) = 0.02667 M.

Now, to determine the pH of the solution, we need to consider the NH4+/NH3 buffer system. When NH4+ is dissolved in water, it hydrolyzes to produce NH3 and H3O+ (hydronium ions):

NH4+ + H2O --> NH3 + H3O+

This equilibrium process establishes a relationship between the concentrations of NH4+, NH3, and H3O+ ions. The equilibrium constant for this process is given by Kb, the base dissociation constant.

Kb = [NH3][H3O+] / [NH4+]

In this case, we can assume [H3O+] is equivalent to [OH-] since NH3 is a weak base. Kb is given as 1.76 * 10^(-5).

Now, to calculate the concentration of OH-, we need to solve for [OH-] using the Kb expression. Rearranging the equation:

[OH-] = Kb * ([NH4+]/[NH3])

[OH-] = 1.76 * 10^(-5) * (0.02667 M / 0.02667 M)
= 1.76 * 10^(-5) M

Now, we can calculate the pOH of the solution:

pOH = -log10([OH-])
= -log10(1.76 * 10^(-5))
≈ 4.7545

Finally, to find the pH of the solution, use the relationship:

pH = 14 - pOH
= 14 - 4.7545
≈ 9.2455

Therefore, the pH of the solution formed by adding 20 mL of 0.08 M NH3 to 40 mL of 0.04 M HCl is approximately 9.2455.