It's a prove by induction and I don't understand how they did the proof, especially I do not understand the red.
\begin{align}f^{(n+1)}(x)=\left(f^{(n)}\right)'(x)&=\frac{d}{dx}((3^nx+n\cdot 3^{n-1})\cdot e^{3x-1})\\ &=3^n\cdot e^{3x-1}+\color{red}{3}(3^nx+n\cdot3^{n-1})\cdot e^{3x-1}\\ &=(3^n+\color{red}{3^{n+1}}x+\color{red}{n\cdot3^n})\cdot e^{3x-1}\\ &=(\color{red}{3^{n+1}x+(n+1)3^n})\cdot e^{3x-1}\end{align}