Show that sum of an AP whose first term is a,the second term b and the last term c,is equal to (a+c)(b+c-2a)/2(b-a)..Plzzz i need hlpp!!!!

first term = a

second term = b

last term = c

so, common difference = (b-a)

now, let last term be the Nth term of the AP

L = a + (n-1) d

=> c = a + (n-1) (b-a)

=> c = a + nb -an -b +a

=> c = 2a -an +nb -b

=> c = 2a -b +nb -an

=> n = (b+c-2a) / (b-a)

now,

S_{n} = n/2 (first term + last term)

=> S_{n} = (b+c-2a) (a+c) / 2(b-a)

**
**