Explanation:
the sum of the first n terms of an arithmetic sequence is
Sn = n/2 × (a1 + an)
which is equivalent to
Sn = n/2 × (2a1 + (n-1)×d)
d is the constant, common difference between consecutive terms.
a1 is the first term.
an is the last term of the summed sequence.
so, we know
S15 = 345 = 15/2 × (2a1 + 14d) = 15×(a1 + 7d)
23 = a1 + 7d
a5 = 65 = a1 + 4d
remember,
a1 = a1
a2 = a1 + d
a3 = a2 + d = a1 + d + d = a1 + 2d
...
that means we have 2 equations with 2 variables (a1 and d) :
23 = a1 + 7d
65 = a1 + 4d
let's simply subtract the second from the first equation :
23 = a1 + 7d
- 65 = a1 + 4d
---------------------
- 42 = 0 + 3d
3d = -42
d = -14
and now we use that in one of the original equations like
23 = a1 + 7×-14 = a1 - 98
a1 = 121