Hi there, new user here. would appreciate it alot if someone can help me out with this problem.

I am looking at the solution and I cannot seem to figure out how they are going line by line.

imgur: the simple image sharer

see above, can someone please explain how they went from

rec(n) = rec(n-1) + 2

rec(n-1) = (rec(n - 2) + 2) + 2 = rec(n - 2) + 2 X 2 <--- how is it times 2?