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

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*}$$