The sum of the first several terms of the arithmetic sequence - 10, - 6, - 2,2 is 54? How does the process of finding the middle come from

The sum of the first several terms of the arithmetic sequence - 10, - 6, - 2,2 is 54? How does the process of finding the middle come from

First item A1 = - 10
Tolerance d = - 6 - (- 10) = 4
Summation formula of arithmetic sequence:
Sn=na1+n(n-1)d/2
Substituting A1 = - 10 d = 4 into the above formula:
Sn=-10n+n(n-1)×4/2
=-10n+2n(n-1)
=-10n+2n²-2n
=2n²-12n
∵Sn=54
∴2n²-12n=54
2n²-12n-54=0
n²-6n-27=0
The factorization is: (N-9) (n + 3) = 0
The solution is n = 9 or n = - 3 (rounding off)
The sum of the first nine terms of the arithmetic sequence is 54