This is an arithmetic progression.
Tn = a + (n -1)* d.
a = First term
n = number of terms
d = common difference.
First term, a = 12.
Sixth term, T6 = a + (6 -1)*d = a + 5d = 42
a + 5d = 42
12 + 5d = 42
5d = 42 - 12
5d = 30
d = 30/5
d = 6.
Writing the first six terms, we keep adding six.
12, 18, 24, 30, 36, 42.
Cheers.