Let $A$ and $B$ be diagonally opposite vertices of a cube. An ant is crawling on a cube starting from $A$, and each second it moves at random to one of the three vertices adjacent to its current one. Find the expected number of steps for the ant to get to vertex $B$.
Let $C_{1}, C_{2}, C_{3}$ be the vertices of the cube adjacent to $A$, and $D_{1}, D_{2}, D_{3}$ the vertices adjacent to $B$. Let $x$ be expected time to get to $B$ starting from $A$. From $A$, you have to go to $C_{1}, C_{2}$, or $C_{3}$, so the expected time to get to $B$ from one of these vertices is $x-1$.

Let $y$ be the expected number of steps to get to $B$ from $D_{1}, D_{2}$, or $D_{3}$ (these are all the same by symmetry). From these points, you have a $\frac{1}{3}$ chance of going to $B$
immediately, and a $\frac{2}{3}$ chance of going to one of $C_{1}, C_{2}$, or $C_{3}$, from which it will take an expected $x-1$ additional steps to get to $B$ (plus the one you already took). Thus, the expected number of steps to get from $D_{1}, D_{2}$, or $D_{3}$ to $B$ is

$$
y=\frac{1}{3} \cdot 1+\frac{2}{3} x
$$

Now, from $C_{1}, C_{2}$, or $C_{3}$, you have a $\frac{1}{3}$ chance of going to $A$, in which case the expected number of additional steps to get to $B$ will be $x$, and you have a $\frac{2}{3}$ chance of going to one of $D_{1}, D_{2}$, or $D_{2}$, in which case the expected number of additional steps will be $y$. This gives

$$
x-1=\frac{1}{3}(1+x)+\frac{2}{3}(1+y)=1+\frac{1}{3} x+\frac{2}{3} y .
$$

Substituting in for $y$ using the first equation gives

$$
x=2+\frac{1}{3} x+\frac{2}{3}\left(\frac{1}{3}+\frac{2}{3} x\right)=\frac{20}{9}+\frac{7}{9} x .
$$

Solving this gives $x=10$.