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.
You are in the right direction:
Similarly to the method for finding particular solution for ODE, you can search a particular solution as $a_n=D \times n \times 1^n$: $$a_n-3a_{n-1}+2a_{n-2}=D(n-3(n-1)+2(n-2)) =-D$$ so $D=2$.
Finally by linearity: $$a_n=\frac{9}{2} 3^n+2 n$$ is a particular solution.