Assume initially there are $2$ player gamble,$A$ and $B$. $A$ has $k$ and $B$ has $a-k$ and each round they will bet $1$ and there is always a winner in every game. Also when $A$ have $1$ dollars and just lose it, then she have probability $\epsilon$ s.t $B$ will give her $1$ dollars. Also each game A has probability $p$ to win the game
My solution: for $k\ge 1$ let $h_k$ be the probability that A is ruined at the state A has a capital of $k$ dollars. Then $h_k=ph_{k+1}+qh_{k-1}$ where $p+q=1$ and and we also know $h_0=(\epsilon)h_1+(1-\epsilon)$ and $h_a=0$ and after solving the difference equation i got $h_k=\frac{\epsilon -1}{(\epsilon-1)a-\epsilon}(a-k)$
is the probability and the answer correct ???