I have a problem with understanding the way of deriving a series based on a given recurrence relation.
Let us consider the following recurrence relation: $$ f(n) = b + a f(n-1) $$ for some values $a$ and $b$.
My goal is to a find a general formula for $f(n)$. I suppose that I can do it using a series as follows $$ f(n) = b + a f(n-1) = b + a(b + a f(n-2)) = \ldots = \sum_{i=0}^{\infty} b a^i. $$
The second approach to this problem can be as follows: I write a recurence formula for $n+1$ element, i.e. $$ f(n+1) = b + a f(n) \Rightarrow f(n) = -\frac{b}{a} + \frac{1}{a} f(n+1) $$ and therefore $$ f(n) = -\frac{b}{a} + \frac{1}{a}f(n+1) = -\frac{b}{a} + \frac{1}{a} \left(-\frac{b}{a} + \frac{1}{a}f(n+2)\right) = \ldots = -\sum_{i=1}^{\infty}\frac{b}{a^i} $$
I obtained two different answers. I cannot understand which of these approaches is correct and why.
I suppose that this is a basic issue in mathematics, but I have never learn about it and I am just curious how to work with such recurence relations.