We know that the pH of a solution is:
pH = -log[H+]
Let c be the fraction of coffee in the drink and m be the fraction of milk in the drink. Because these are the parts of a whole, they add up to 1. c + m = 1
pH of coffee = 5
pH of milk = 6
[H+ in solution] = c[H+ in coffee] + m[H+ in milk]
[H+ solution] = 10^(-5.8) = 1.58 x 10⁻⁶
[H+ coffee] = 10^(-5) = 1 x 10⁻⁵
[H+ milk] = 10^(-6) = 1 x 10⁻⁶
1.58 x 10⁻⁶ = c(1 x 10⁻⁵) + (1 - c)1 x 10⁻⁶
c = 0.064
m = 0.936
Amount of coffee = 14 x 0.064 = 0.896 oz
Amount of milk = 14 - 0.896 = 13.104 oz