$1^{st}$ step is taken with probability $=1$ i.e. it will go $1$ step closer to cliff so now it need to take $n-1$ inches more.
For remaining $n-1$ inches,
suppose he takes $k$ steps and $l$ steps to move forward and backwards respectively and by taking $k+l$ steps he reaches at the top. $(k>l)$
since in each step he covers $\pm1$ inch so in $k+l$ steps he covers $n-1$ inches.
i.e. $k+l = n-1$
$step$ |
$+1$ |
$-1$ |
$P(step)$ |
$1/3$ |
$2/3$ |
so we can say that he takes $k$ steps with probability $1/3$ and $l$ steps with probability $2/3$ to cover the distance of $n-1$ inches. (also he has already covered $+1$ step with probability $1$)
$E(step)=1.1+ 1. (\frac{1}{3})^k -1. (\frac{2}{3})^l $
$\implies E(step)=1+ \frac{1}{3} + \frac{1}{3} + \frac{1}{3} + \frac{1}{3} + ...k\ times - \frac{2}{3} - \frac{2}{3} -\frac{2}{3} -\frac{2}{3} -\frac{2}{3} ....l \ times$
$\implies E(step)=1+ ( \frac{1}{3} -\frac{2}{3}) + ( \frac{1}{3} -\frac{2}{3}) + ( \frac{1}{3} -\frac{2}{3}) +...l \ times + \frac{1}{3} + \frac{1}{3} + \frac{1}{3} + ...(k-l)\ times$
$\implies E(step)=1- ( \frac{1}{3} ) - ( \frac{1}{3}) - ( \frac{1}{3}) +...l \ times + \frac{1}{3} + \frac{1}{3} + \frac{1}{3} + ...(k-l)\ times$
$\implies E(step)= 1- (\frac{1}{3})^l +(\frac{1}{3})^{k-l} $
$\implies E(step)= 1- (\frac{1}{3})^{(n-1-k)} +(\frac{1}{3})^{k-(n-1-k)} $
$\implies E(step)= 1- (\frac{1}{3})^{-(k-n+1)} +(\frac{1}{3})^{2k-n+1} $
$\implies E(step)= 1- (3)^{(k-n+1)} +(3)^{-2k+n-1} $
So option $d.$ is correct.