So, the question is to derive the closed form solution to the recurrence relation $$T(n) = 3T(n-1) + 5,\hspace{5mm} T(0) = 0.$$
$\begin{align}T(n) &= 3T(n-1)+5 \\&= 3(3T(n-2)+5)+5 \\&= 3(3(3T(n-3)+5)+5)+5\end{align}$
I'm just struggling to go from here. I understand that it's $3$ to the power of something but I'm lost on what I have to do after this.
There are two types of solutions here: the homogeneous and the particular. Rewrite the equation as
$$T_n - 3 T_{n-1} = 5$$
The homogeneous solution is simply the solution assuming the RHS is zero. Thus $T_n^{(H)} = A \cdot 3^n$. The particular solution is a simple solution that satisfies the equation and boundary conditions. In this case, $T_n^{(P)} = B$, a constant:
$$B - 3 B = 5 \implies B=-\frac{5}{2} $$
The solution is the sum of the homogeneous and particular solutions:
$$T_n = A \cdot 3^n - \frac{5}{2} $$
$$T(0)=0 \implies A=\frac{5}{2} $$