We use the sum of an AP ie Sum of n terms=n/2(2a+(n-1)d), the first time (a) is 45, the common difference (d) is 2, and we are finding the number of terms (n). We also know the total sum so we can sub in the values of a, d and n into the sum of AP formula to find n. I'll start you off:
1365=n/2(90+(n-1)x2)
I find it easy to list out what u know ie a=this, d=that, etc. and then use what you know to find the unknown.