For solving $$a_n-3a_{n-1}+2a_{n-2}=3^n-2,$$ I tried as follows:
For the homogeneous part the characteristics equation is : $r^2-3r+2=0\implies r=1,2$. So, $$ a_n^h=A(1)^n+B(2)^n=A+B2^n $$ Now how will I guess the particular solution?
For that also, I tried with $a_n=C3^n+D$ but did not get anything. Please help me.