In an AP the first term is 2 and the nth term is 29 and the sum of the n term is 155 find n

we know that 2+(n-1)d = 29, so

d = 27/(n-1)

sum of first n terms is

n/2 (4+(n-1)d)
n/2 (4+(n-1)*27/(n-1)) = 155
n = 10

check:
d = 27/9 = 3
10th term is 2+9(3) = 29
S10 = 5(4+9(3)) = 155