\(3.3^{n-1}.\left(6.3^{n+2}+3\right)-2.3^n\left(3^{n+3}-1\right)=405\)
\(\Rightarrow3.3^{n-1}.6.3^{n+2}+3.3.3^{n-1}-2.3^n.3^{n+3}+1.2.3^n=405\)
\(\Rightarrow3^{1+n-1}.6.3^n.3^2+3^{1+1+n-1}-2.3^n.3^n.3^3+3^n.2=405\)
\(\Rightarrow3^n.\left(6.3^2\right).3^n+3^{n+1}-\left(2.3^3\right).3^{n+n}+3^n.2=405\)
\(\Rightarrow\left(3^n.3^n\right).54+3^{n+1}-54.3^{2n}+3^n.2=405\)
\(\Rightarrow3^{2n}.54+3^{n+1}-3^{2n}.54+3^n.2=405\Rightarrow3^{n+1}+3^n.2=405\)
\(\Rightarrow3^n.3+3^n.2=405\Rightarrow3^n.5=405\Rightarrow3^n=81=3^4\Rightarrow n=4\)