You’ve got to work it backwards. Say the husband is blood-related to 9 out of 12 kids—that means three aren’t his. Those three must be from his wife’s other marriage.
They say every new generation is smarter, so if you have 12 children, statistically speaking, one of them will solve this puzzle. Now, for this particular large family, each of them has three children from a previous marriage. Just do a simple subtraction. Do you need a calculator?