Show that the following limit is $AB$. I am interested in showing the following:
$$
\lim\limits_{p\rightarrow 1/2} \frac{B}{1-2p}-\frac{A+B}{1-2p}\frac{r^B-1}{r^{A+B}-1}=AB.
$$
Here $A,B\in(0,\infty)$ and $r=\frac{1}{p}-1$.
This is for a probability theory problem involving a biased random walk, leaving an interval $(-B,A)$
I'm not really sure how to proceed in this problem and could use some help.
Thank you for any assistance.

Considering the expression $$Z=\frac{B}{1-2p}-\frac{A+B}{1-2p}\frac{r^B-1}{r^{A+B}-1}$$ start changing variable $p=\frac{1-x}{2}$; this makes $$Z=\frac{B}{x}-\frac{(A+B) \left(\left(\frac{2}{1-x}-1\right)^B-1\right)}{x
   \left(\left(\frac{2}{1-x}-1\right)^{A+B}-1\right)}$$ and use the generalized binomial theorem or, better, use Taylor expansion around $x=0$ $$\frac{2}{1-x}=2+2 x+2 x^2+2 x^3+O\left(x^4\right)$$ $$\frac{2}{1-x}-1=1+2 x+2 x^2+2 x^3+O\left(x^4\right)$$ $$\left(\frac{2}{1-x}-1\right)^k=1+2 k x+2 k^2 x^2+\frac{2}{3} \left(2 k^3+k\right) x^3+O\left(x^4\right)$$ Using all the above, you should end with $$Z=A B+\frac{1}{3} A B (B-A)x-\frac{1}{3}  A B (A B-1)x^2+O\left(x^3\right)$$ and $x\to 0$. This shows the limit and how it is approached.
