So, it is "well known" that any subgroup of a cyclic group is cyclic. As you have pointed out, gcd(12, 20)=4. This means that the subgroup generated by 12 and 20 is equal to the subgroup generated by 4, (this should be in your notes, and is the crux of the argument - if you do not know it, learn it!). So, what is the index of in ? Divide 40 by this order to get your answer (why?).