We have,
A.P. is
(a2+b)+(a2+2b)+(a2+3b)........
First term A=(a2+b)
Common difference
d=b
Then,
Sum of n terms
Sn=n2(2A+(n−1)d)
=n2[2×(a2+b)+(n−1)b]
=n2[2a2+2b+nb−b]
Hence, this is the answer.