Calculation of the pH of a mixture of a strong acid and weak acid
Chemical thermodynamics is easy in that it always has enough equations to derive all the variables involved, and guarantees to produce a unique solution. The derivation itself may be not that easy, but that's another story.

In short, we have some weak acid $\ce{HA}$ and the products of its dissociation. Mind you, $\ce{H+}$ comes also from the strong acid, which dissociates completely. Now, the equations:

$$
\ce{[HA] + [A-] = }C_1 \\
\ce{[H+]=[A-]}+C_2 \\
{\ce{[H+][A-]}\over\ce{[HA]}} = K_\mathrm{a}
$$

Is the rest clear?


   Use the second equation to exclude $\ce{[A-]}$, then use the first to exclude $\ce{[HA]}$, and end up with a quadratic equation on $\ce{H+}$.