This is a numerical-answer question. The correct answer is shown below.
[Solution by Dr. Abubacker] Solving the recurrence, $T_r=2\cdot6^r-2\cdot3^r$ (check $T_1=12-6=6$). Sum $S_n=2\cdot\frac{6(6^n-1)}5-2\cdot\frac{3(3^n-1)}2=\frac{12\cdot6^n-12}5-3\cdot3^n+3=\frac15\left(12\cdot6^n-15\cdot3^n+3\right)=\frac35\left(4\cdot6^n-5\cdot3^n+1\right)$. Comparing with the given form: $n^2-12n+39=3\Rightarrow n^2-12n+36=0\Rightarrow n=6$. Answer: 6.