How exactly is this equation for insertion sort time complexity solved so that it shows it is linear? Background

I am currently taking an Algorithm and Analysis course and doing some extra studying on my own from the text book. This is not a homework question or exercise even. I am just trying to understand completely how the authors are doing the combining of terms in the time/cost equation for Insertion-Sort.

I understand what is being shown up until we get to the actual equation. I understand that each line, barring the comment which is considered to not have a cost, has a constant cost c. 

This is how they have broken down the time/cost for the algorithm in psuedo-code:


for j = 2 to A.length              
&nbsp;&nbsp;&nbsp;&nbsp;key = A[j]  
//Insert A[j] into the sorted
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;sequence A[1..j - 1]
i  = j - 1
while i &gt; 0 and A[i] &gt; key
&nbsp;&nbsp;&nbsp;&nbsp;A[i + 1] = A[i]
&nbsp;&nbsp;&nbsp;&nbsp;i = i - 1
A[i + 1] = key


Here's the cost/time for each line according to textbook:


$c_1n$
$c_2(n-1)$
0
0
$c_4(n - 1)$
$c_5 =\sum\nolimits_{j}^{n} 2t$
$c_6=\sum\nolimits_{j}^{n} 2{t - 1}$
$c_7=\sum\nolimits_{j}^{n} =2{t - 1}$
$c_8(n - 1)$


The best case run time of the algorithm is then given by:


  $$
T(n) = \ c_1(n) + c_2(n - 1) + c_4(n - 1) + c_5(n - 1) + c_8(n - 1)
$$


This is where I get confused. Somehow they combine all of these terms to simplify the equation but it's done in one step so I can not follow/reproduce it on my own. This is what they come up with:


  $$
  = (c_1 + c_2 + c_4 + c_5 + c_8)n - (c_2 + c_4 + c_5 + c_8)
$$


According to the author it can be expressed as $an + b$ and thus a linear function of $n$. As mentioned above, I don't know how they simplified the equation nor how it can be expressed as $an + b$. I do understand that it is in linear equation form. How do I make the leap or bridge the gap per say?
So you question is how to go from:

T(n)= c1(n)+c2(n−1)+c4(n−1)+c5(n−1)+c8(n−1)


to

T(n)= (c1+c2+c4+c5+c8)n−(c2+c4+c5+c8)


Step 1 (Expand the statement):

T(n)= c1(n)+c2(n)−c2+c4(n)−c4+c5(n)−c5+c8(n)−c8


Step 2 (Group similar elements):

T(n)= c1(n)+c2(n)+c4(n)+c5(n)+c8(n)−c2-c4-c5-c8


Step 3 (Find the factors):

T(n)= (c1+c2+c4+c5+c8)n−(c2+c4+c5+c8)