The Problem
We can show that the condition for the Standard Model to be anomaly-free is that the symmetrized trace over the generators of the gauge group vanishes:
\begin{align} \text{tr} \big(\{\tau^i , \tau^j \} \tau^k \big) \stackrel{!}{=} 0 \end{align}
How can I see that this is true for all possibilities in the Standard Model?
Attempt at a solution
One of the sources that I've looked at is Adel Bilal's notes on anomalies (available here: Lectures on Anomalies). Here he explicitly writes
I see the hypercharges showing up, but I basically don't have the background to understand why the pre-factors of 2 etc. show up in these calculations. Bilal also writes earlier:
I'm sure the image above should just answer my question, but nonetheless I don't understand the pre-factors.
I have some basic understanding of representation theory and introductory QFT, but am not really that familiar with the Standard Model. So if the answer could be shaped with that in mind, it would be helpful.