We have
a8 = a + (8 – 1)d = a + 7d = 37 …(1)
and a12 = a + (12 – 1)d = a + 11d = 57 …(2)
Solving the pair of linear equations (1) and (2), we get
a + 7d – a – 11d = 37 – 57
⇒ – 4d = –20
⇒ d = 5
Putting the value of d in eq (1), we get
a + 7(5) = 37
⇒ a + 35 = 37
⇒ a = 2
Hence, the required AP is 2, 7, 12, 17,…