A simple way is the following:
- Pick the rank of the three-of-a-kind: there are $\binom{13}{1}=13$ ways of doing so.
- Pick the three suits that will go into the three-of-a-kind; there are $\binom{4}{3}=4$ ways of doing so (equivalently: pick the card from that rank that is not being picked, which can be done in $\binom{4}{1}=4$ ways).
- Pick the rank of the two-of-a-kind: there are $\binom{12}{1}=12$ ways of doing so (because one rank has already been chosen for the three-of-a-kind).
- Pick the two suits that will be in the two-of-a-kind: there are $\binom{4}{2}=\frac{(4)(3)}{2}=6$ ways of doing so.
Total: $13\times 4\times 12\times 6$.
Your errors: you are counting the order in which the cards are chosen; so for example, you count separately the case of aces of clubs, spades, and hearts, followed by the two of hears and two of diamonds; and the case of the aces of clubs, spades, and hears, followed by the two of diamonds and hearts; and the case of the aces of clubs, hearts, and spades, followed by the two of hearts and diamonds, etc. These are all the same hand, but you are counting them separately.
How much did you overcount? For each choice of three-of-a-kind, you counted it six times, as many times as you have to list the three cards in order. And for each choice of two-of-a-kind, you counted it twice, once for each ordering of the two cards. In total, you counted each hand twelve times, so you need to divide by $12$ in order to compensate for the overcounting.