How was the equation re-written? This question is a part of inhomogeneous recurrence relations (IHR). The actual question was 

Find a solution to $a_n - a_{n-1} = 3(n-1)$ where $n \ge 1$ and $a_0 = 2$.

While going through the solution, the expression
$$3 \sum_{n=1}^\infty (n-1)X^n$$
was re-written as
$$3 \cdot \frac{X^2}{(1-X)^{2}}$$
I am not able to understand how this was done. What were the steps involved in this process of conversion?
Update:
The textbook says it is using pre-calculated values from this table.
But i do not see any correlation between what we are converting and what's available in the table.Need help understanding how this table was used for conversion

 A: The basic identity you should know is the geometric series (Wikipedia link):
$$\frac{1}{1-x}=\sum_{n=0}^\infty x^n\quad \text{ (for }|x|<1)$$
Therefore
$$\frac{1}{(1-x)^2}=\frac{d}{dx}\left(\frac{1}{1-x}\right)=\frac{d}{dx}\left(\sum_{n=0}^\infty x^n\right)=\sum_{n=0}^\infty nx^{n-1}=\sum_{n=1}^\infty nx^{n-1}$$
Therefore
$$\begin{align*}
3\sum_{n=1}^\infty (n-1)x^n&=3\left(\sum_{n=1}^\infty nx^n\right)-3\left(\sum_{n=1}^{\infty}x^n\right)\\
&=3x\left(\sum_{n=1}^\infty nx^{n-1}\right)-3x\left(\sum_{n=0}^{\infty}x^n\right)\\
&=3x\left(\frac{1}{(1-x)^2}-\frac{1}{1-x}\right)\\
&=3x\left(\frac{1-(1-x)}{(1-x)^2}\right)\\
&=\frac{3x^2}{(1-x)^2}
\end{align*}$$
A: You can just look at the Taylor expansion of the function. 

Without going into analysis too much, here some fact it the general realm of problems you deal with here:
For $|\,x\,|<1$, you have the geometric series
$\dfrac{1}{1-x}=\sum_{n=0}^\infty x^n,$
and it comes in handy to know that if you have another function given by a series 
$f(x)=\sum_{n=0}^\infty c_n x^n,$ 
then multiplication by $\dfrac{1}{1-x}$ acts as follows:
$\dfrac{1}{1-x}\cdot f(x)=\sum_{n=0}^\infty\left(\sum_{k=0}^n c_k\right) x^n$
You can see this by multiplying out the series written out to the highest relevant order, and I also advise you to read the good book Generatinfunctionlogy by Wilf. He has it public here (link to pdf).
Now since 
$\dfrac{x^2}{1-x}=x^2\,(1+x+x^2+x^3+\dots)=x^2+x^3+x^4+x^5+\dots$ 
is itself a function with series representation with coefficients $c_k$ given by $0,0,1,1,1,1,1,\dots$, you get
$\dfrac{x^2}{(1-x)^2}=\dfrac{1}{1-x}\cdot \dfrac{x^2}{1-x}=\sum_{n=0}^\infty\left(\sum_{k=2}^n 1\right) x^n=\sum_{n=0}^\infty\left(n-1\right) x^n.$
