To find the general solution of $a_{n+1}=a_n+3n^2-2$ make, as suggested, the Ansatz
$a_n= c_0+c_1 n+ c_2 n^2 +c_3 n^3$ and seek the coefficients $c_0,c_1,c_2,c_3$ for this third degree polynomial.
We have
$\begin{array}{rcl}
a_{n+1}&=&c_0 +c_1(n+1)+c_2(n+1)^2+c_3(n+1)^3 \\
&=& c_0+ c_1(n+1)+c_2(n^2+2n+1)+ c_3(n^3+3n^2+3n+1); \\
\Rightarrow a_{n+1}-a_n&=& c_1 + c_2(2n+1)+c_3(3n^2+3n+1) \\
&=&(c_1+c_2+c_3)+(3c_3+2c_2)n+3c_3 n^2.\\
\end{array}$
At the other hand we know that $a_{n+1}-a_n=-2+ 3n^2.$
Comparing the coefficients we get the linear system
$\begin{array}{rcl}
c_1+c_2+c_3&=& -2 \\
3c_3+2c_2&=& 0 \\
c_3 &=&1
\end{array} $
and from this $c_3=1, c_2=-3/2, c_1=-3/2.$ There remains at our disposal $c_0.$ Since we wish $a_0=3,$ we find $c_0=3.$
So the particular solution sought is
$ a_n= 3-\frac{3}{2}n-\frac{3}{2}n^2+n^3 = 3+ \frac{1}{2}n(-3-3n+2n^2) $
Addendum: Problems like these and much more complicated ones can also be solved by software for doing mathematics. For example
if you use in Mathematica\copyright the command RSolve
for solving recurrence relations, here in the form
RSolve[{a[n + 1] == a[n] + 3 n^2 - 2 , a[0] == 3 }, a, n] , it will immediately respond with
{{a -> Function[{n}, (1/2)(6 - 3n - 3n^2 + 2n^3)]}}
Books or articles on difference equations can be easily found in Wikipedia.