Recurrence relation: verify that the expression given for $a_n$ Consider the following difference equation and initial conditions.
(i) $a_n=(-3)^n+n$, $a_0=1, a_1=-2$
satisfies 
(ii) $a_{n+1}+2a_n - 3a_{n-1} =4$
The answer is 
$=(-3)^{n+1}+(n+1)+2((-3)^n+n)-3((-3)^{n-1}-(n-1)$ <---first line
$=(-3+2+1)(-3)^n+(n+1+2n-3n+3)$ <--- second line
$=4$

How to apply (i) into (ii) especially first and second line?
Could you please help me?  If you know what rule of algebra I need to brush up please let me know.  To clarify and prevent from any confusion about the question I attached original question and answer.


 A: From what I understand, this question should be rephrased as.
Let $a_n=(-3)^n+n$, for all integers $n\ge 0$. For $n\ge 1$, evaluate $a_{n+1}+2a_n-3a_{n-1}$.
The answer is $a_{n+1}+2a_n-3a_{n-1}=4$, which follows from elementary manipulations.
EDIT: @EvanS Since you are so desperate. To transform the first line into the second, just group the terms. For instance, you have $(-3)^{n+1}+A+2(-3)^n+2n+(-3)^n-B$ so factor out $(-3)^n$ to get $(-3)^n(-3+2+1)$. And similar for the other terms.
A: Usually, the task for difference equations is to solve a given one using the provided initial values. The underlying task in this problem appears to be to go the reverse way: Given a sequence, determine the difference equation that it satisfies and the initial values. However, it seems that the problem was heavily reworked to contain now too many hints resulting in the obfuscation of the original task. The original task is to check that a solution matches a difference equation, which is even easier.

Starting with $a_n=(−3)^n+n$, one can reconstruct the recurrence equation by killing the terms contained in it. First one has for the geometric sequence $(-3)^{n+1}=-3\cdot(-3)^n$, so
$$
b_n=a_{n+1}+3a_n=n+1+3n=4n+1
$$
By forming the simple difference, the linear term is reduced to a constant
$$
c_n=b_{n+1}-b_n=4n+5-(4n+1)=4
$$
On the other hand, 
$$
b_{n+1}-b_n=a_{n+2}+3a_{n+1}-a_{n+1}-3a_n=a_{n+2}+2a_{n+1}-3a_n,
$$
giving the recurrence contained in the problem statement (if it were corrected as suggested in the comments resp. the answer of mathse). 
The next reduction to zero would again use the difference
$$
d_n=c_{n+1}-c_n=a_{n+3}+a_{n+2}-5a_{n+1}+3a_n=0
$$

Insertion of the solution into the difference equation looks of course like
\begin{align}
a_{n+1}+2a_n-3a_{n-1}
&=((-3)^{n+1}+(n+1))+2((-3)^n+n)-3((-3)^{n-1}+(n-1))\\
&=(-3)^n(-3+2+1)+((n+1)+2n-3(n-1))\\
&=4
\end{align}
Perhaps it is a typo, or the vertical part of the plus sign became an aliasing error while printing or scanning.
