I'm unsure on how to normalize for two different variables.
Person A makes 20 pastries total, whereas Person B makes 50.
5 of those pastries, so 25%, are sampled from Person A; 10 for Person B, for a sample of 20%.
The pastry chef determines from the samples that 2 of Person A's pastries are subpar, compared to 5 for Person B.
Therefore the chef interpolates that 50% of Person B's pastries are subpar to standards, compared to 40% for Person A. But that seems like shallow reasoning, since Person B's made at least twice more pastries than A.
Thus, how do I normalize to compare Person A and Person B taking into account sampling size and rate of error?
You are asking to compare two rates.
The error rate of $A$ was measured to be $2$ out of $5$, i.e. $40\%$.
The error rate of $B$ was measured to be $5$ out of $10$, i.e. $50\%$.
That's it. Neither the sample size nor the total production size do influence these ratios and there is no need/possibility to normalize.
The only difference size can make is about the dispersion of the results (variance), which is larger for a smaller sample, i.e. giving a less accurate estimate of the mean.