Algebra manipulation of equation to show equivalence 
Suppose $$\psi(z) = p\psi(z+1) + (1-p)\psi(z-1)$$ and also $$\psi(z) = \frac{z}{g}$$
  I want to show that if we let $R = \frac{(1-p)}{p}$ then we have an equivalent expression to the above defined as $$\psi(z) = \frac{R^z - 1}{R^g - 1}$$

What I have thus far:
Note that $\psi(z)$ is equivalent to $$p\psi(z) + (1-p)\psi(z) = \psi(z) = p\psi(z+1) + (1-p)\psi(z-1)$$
or
$$(1-p)\left(\psi(z) - \psi(z-1)\right) = p\left(\psi(z+1) - \psi(z)\right)$$
dividing $p$ by both sides we get 
\begin{align*}
&\frac{(1-p)}{p}\left(\psi(z) - \psi(z-1)\right) = \psi(z+1) - \psi(z)\\
&\Leftrightarrow R\left(\psi(z) - \psi(z-1)\right) = \psi(z+1) - \psi(z)
\end{align*}
From here I am not sure how to show that $$\psi(z) = \frac{R^z - 1}{R^g - 1}$$
Any suggestions are greatly appreciated.
 A: @Wolfy I think the correct statement of the result is:

Suppose $$\psi(z) = p\psi(z+1) + (1-p)\psi(z-1)$$ where $0<p\leq 1$. Suppose also that $\psi(0)=0$ and $\psi(g)=1$.  Then:

*

*if $p=1/2$,  we have $$\psi(z) = \frac{z}{g}$$


*if $p \neq1/2$, we have
$$\psi(z) = \frac{R^z - 1}{R^g - 1} \quad \textrm{ where } R = \frac{(1-p)}{p} $$

Proof:
We have that
$$p\psi(z) + (1-p)\psi(z) = \psi(z) = p\psi(z+1) + (1-p)\psi(z-1)$$
or
$$(1-p)\left(\psi(z) - \psi(z-1)\right) = p\left(\psi(z+1) - \psi(z)\right)$$
dividing $p$ by both sides we get
$$\frac{(1-p)}{p}\left(\psi(z) - \psi(z-1)\right) = \psi(z+1) - \psi(z)$$
that is
$$R\left(\psi(z) - \psi(z-1)\right) = \psi(z+1) - \psi(z)$$
So we have proved that, for any $z\in \mathbb{N}$ such that $z>0$,
$$\psi(z+1) - \psi(z) = R\left(\psi(z) - \psi(z-1)\right)  $$
So we have by a simple induction that
$$\psi(z+1) - \psi(z) = R\left(\psi(z) - \psi(z-1)\right) = R^2\left(\psi(z-1) - \psi(z-2)\right)= \ldots = R^z\left(\psi(1) - \psi(0)\right) $$
Since $\psi(0)=0$, we have, for any $z\in \mathbb{N}$ such that $z>0$,
$$\psi(z+1) - \psi(z) = R^z \psi(1) $$
Now note that, for any $z\in \mathbb{N}$ such that $z>0$
$$\psi(z)= \psi(1) + \sum_{i=1}^{z-1} (\psi(i+1) - \psi(i) )= \psi(1) + \sum_{i=1}^{z-1} R^i \psi(1)= \sum_{i=0}^{z-1} R^i \psi(1) $$
So we have proved that, for any $z\in \mathbb{N}$ such that $z>0$
$$\psi(z)= \left (\sum_{i=0}^{z-1} R^i \right ) \psi(1) \tag{1} $$
Now, we have two cases:
Case 1: $p=1/2$. Then $R=1$ and we have $\sum_{i=0}^{z-1} R^i =z$. So we have, , for any $z\in \mathbb{N}$ such that $z>0$
$$\psi(z)= z \psi(1) $$
In particular, for $z=g$, since $\psi(g)=1$, we have
$$1 = \psi(g)= g \psi(1)$$
Since $\psi(0)=0$ and $\psi(g)=1$, we have that $g\neq 0$ and
$$ \psi(1) = \frac{1}{g} $$
So we have, for any $z\in \mathbb{N}$ such that $z>0$
$$\psi(z) = \frac{z}{g}$$
For $z=0$ we trivially have
$$\psi(0) =0= \frac{0}{g}$$
So we have that, for any $z\in \mathbb{N}$
$$\psi(z) = \frac{z}{g}$$
Case 2. $p \neq 1/2$. Then $R \neq 1$ and we have
$$\sum_{i=0}^{z-1} R^i =\frac{R^z - 1}{R - 1} $$
So, from $(1)$, we have, for any $z\in \mathbb{N}$ such that $z>0$
$$\psi(z)= \frac{R^z - 1}{R - 1} \psi(1)$$
In particular, for $z=g$, since $\psi(g)=1$, we have
$$1 = \psi(g)= \frac{R^g - 1}{R - 1} \psi(1)$$
So
$$ \psi(1) = \frac{R - 1}{R^g - 1} $$
So we have, for any $z\in \mathbb{N}$ such that $z>0$
$$\psi(z) = \frac{R^z - 1}{R^g - 1}$$
For $z=0$ we trivially have
$$\psi(0) =0= \frac{R^0 - 1}{R^g - 1}$$
So we have that, for any $z\in \mathbb{N}$
$$\psi(z) = \frac{R^z - 1}{R^g - 1}$$
Remark: In the context of the Gambler's Ruin problem, a coin is tossed repeatedly. Each time, if the result is Head, the Gambler wins a dollar and if the result is Tail, the Gambler loses a dollar. The parameter $p$ is the probability that the result be Head. Our case 1 above corresponds to a fair coin ($p=1/2$). Our case 2 above corresponds to a biased coin ($p\neq 1/2$).
In the context of the Gambler's Ruin problem, we are interested only in $z$ such that $0\leq z \leq g$.
