We have, S40=1030 and S12=57
We know, Sn=2n[2a+(n−1)d]
So, S40=20(2a+39d)=1030⇒2a+39d=201030=51.5....(1)
And, S12=6(2a+11d)=57⇒2a+11d=657=9.5....(2)
Subtracting , (2a+39d)−(2a+11d)=51.5−9.5
⇒28d=42
⇒d=1.5
Using this in eqn (2), 2a+11(1.5)=9.5
⇒2a+16.5=9.5
⇒2a=−7⇒a=−3.5
Hence, S30−S10=sum of terms from 11 to 30 =220[a11+a30]
a11=a+10d=−3.5+15=11.5,a30=a+29d=−3.5+43.5=40
So, S30−S10=10(11.5+40)=10(51.5)=515