When you have multiple roots, you must multiply the term with a polynomial. For double roots, the polynomial is n+1, and for triple roots, it's [tex]\frac{\left(n+1\right)\left(n+2\right)}2[/tex], etc.
We extend the definition of a to the negative domain, and let [tex]a_n=0[/tex] for [tex]n<0[/tex]. Then we find the value of [tex]a_{n+2}-6a_{n+1}+9a_n[/tex] for [tex]n<0[/tex].
[tex]a_1-6a_0+9a_{-1}=-2[/tex]
[tex]a_0-6a_{-1}+9a_{-2}=1[/tex]
[tex]a_{n+2}-6a_{n+1}+9a_n=0[/tex] for [tex]n<-2[/tex].
Then the equation becomes:
[tex]a_{n+2}-6a_{n+1}+9a_n=H\left[n\right]\left(3\cdot 2^n+7\cdot 3^n\right)-2\delta\left[n+2\right]+\delta\left[n+1\right][/tex], where H is the unit step function.
The Z-transform of this equation is:
[tex]A\left(z\right)=\frac{\frac 3{1-2z^{-1}}+\frac 7{1-3z^{-1}}-2z^2+z}{\left(z^2-6z+9\right)}=\frac{\frac 3{1-2z^{-1}}+\frac 7{1-3z^{-1}}-2z^2+z}{\left(z-3\right)^2}=\frac{3\left(1-3z^{-1}\right)+7\left(1-2z^{-1}\right)+\left(z-2z^2\right)\left(1-5z^{-1}+6z^{-2}\right)}{\left(1-2z^{-1}\right)\left(1-3z^{-1}\right)\left(z-3\right)^2}=[/tex]
[tex]\frac{z^2-6z+1+17z^{-1}}{\left(1-2z^{-1}\right)\left(1-3z^{-1}\right)\left(z-3\right)^2}=[/tex]
[tex]\frac{z^4-6z^3+z^2+17z}{\left(z-2\right)\left(z-3\right)^3}[/tex]
We can write this as:
[tex]A\left(z\right)=\frac P{z-2}+\frac {Qz^2+Rz+S}{\left(z-3\right)^3}[/tex]
Then:
[tex]P\left(z-3\right)^3+\left(Qz^2+Rz+S\right)\left(z-2\right)=P\left(z^3-9z^2+27z-27\right)+Q\left(z^3-2z^2\right)+R\left(z^2-2z\right)+S\left(z-2\right)=z^4-6z^3+z^2+17z[/tex]
We can try solving it in this way:
[tex]P+Q=0[/tex]
[tex]-9P-2Q+R=0[/tex]
[tex]27P-2R+S=0[/tex]
[tex]-27P-2S=z^4-6z^3+z^2+17z[/tex]
This has the following solution:
[tex]P=-z^4+6z^3-z^2-17z[/tex]
[tex]Q=z^4-6z^3+z^2+17z[/tex]
[tex]R=-7z^4+42z^3-7z^2-119z[/tex]
[tex]S=13z^4-78z^3+13z^2-221z[/tex]
The inverse Z-transform of [tex]\frac{-z^4+6z^3-z^2-17z}{z-2}+\frac {13z^6-85z^5+56z^4+208z^3-118z^2+17z}{\left(z-3\right)^3}[/tex] is:
[tex]2^n\left(-8H\left[n+3\right]+24H\left[n+2\right]-2H\left[n+1\right]-17H\left[n\right]\right)+[/tex]
[tex]\frac{3^n}2\left(351H\left[n+3\right]\left(n+4\right)\left(n+5\right)-765H\left[n+2\right]\left(n+3\right)\left(n+4\right)+168H\left[n+1\right]\left(n+2\right)\left(n+3\right)+[/tex]
[tex]208H\left[n\right]\left(n+1\right)\left(n+2\right)-\frac{118}3H\left[n-1\right]\left n\left(n+1\right)+\frac{17}9H\left[n-2\right]\left(n-1\right)n\right)[/tex]
So, that's your function, if my calculations are correct. If not, just follow this general method and you should get the correct answer. It can be simplified further by ignoring the H's and adding all the terms containing n.