*Tower of Hanoi with Adjacency Requirement:* Suppose that
in addition to the requirement that they never move a larger
disk on top of a smaller one, the person who move the disks
of the Tower of Hanoi are also allowed only to move disks
one by one from one pole to an adjacent pole.Assume
poles A and C are at the two ends of the row and pole B is
in the middle. Let:

$a_{n}$ = the minimum number of moves needed to transfer a tower of n disks from pole A to pole C

$b_{n}$ = the minimum number of moves needed to transfer a tower of n disks from pole A to pole B

and $b_{n}$ = $a_{n-1} + 1 + b_{n-1}$.

Show that $b_{n}$ = 3$b_{n-1} +1$, for all integers $ n\geq 2$

The basis step is easy.
We need to proof that if $b_{n}$ = 3$b_{n-1} +1$, then $b_{n+1}$ = 3$b_{n} +1$.

By the inductive hypothesis:

$b_{n}$ = $a_{n-1} + 1 + b_{n-1}$

$b_{n+1}$ = $a_{n} + 1 + b_{n}$

But $a_{n}$ = $2b_{n}$ because to transfer a tower of n disks from pole A to pole C we need to transfer the tower from pole A to pole B and from pole B to pole C.

By the inductive hypothesis:

$b_{n}$ = $a_{n-1} + 1 + b_{n-1}$

$b_{n+1}$ = $2b_{n} + 1 + b_{n}$
$b_{n+1}$ = $3b_{n} + 1$

My solution is right? This serve as a proof?