What is described is simply a random walk.
The probability to get one step up and the probability to get one step down are each $\frac{1}{2}$ in the fair case.
The starting point (0) means that the player A has 3 dollards. If he wins, the random walk gets one step up. If +3 is reached, A has won 3 dollars and B is ruined. If player B wins, the random walk gets one step down. If -3 is reached, player A has 0 dollars, hence he is ruined.
In the fair case, each player has a chance of $\frac{1}{2}$ to be ruined because the probability that the game goes on foreever, is 0.