I got asked this for an assignment but I ran out of time and had to guess. I thought about it after and still not sure about the right approach.
Imagine the corners of a cube. Each second you move to a random neighboring corner (with equal probability). What is the expected number of seconds before you reach the opposite corner?
I couldn't ask clarifying questions but I assume that "neighbouring corner" means you can move one spot up, down, left, right or diagonally.
Here's my attempt: I thought about how the cube is 3D and labelled all the coordinates.
Opposite corner would mean going from (0,0,0) ---> (1,1,1). That means you have a 4 corners to choose from every second.
It's possible to reach the opposite in 3, 4 or 5 steps/seconds. Would you then take how many outcomes for each of those and multiply by 1/4 every time it moves a corner, then averaged out to find the "expected number"?
I tried visualizing this problem below.
Here is one way of reaching an opposite end:

Please help! Thanks!
To begin, let's clear up the assumptions in the problem you made.
Moving from one corner to a "neighboring corner" would involve traveling along an edge. That would be moving left or right, moving up or down, and moving forward or backward. Reworded, if you treat your position as a binary triple, it involves flipping exactly one of the three bits from $1$ to $0$ or vice versa from $0$ to $1$.
Now... notice that we can describe any position on the cube by its "distance" to the goal. Starting from distance $3$ away from the goal (i.e. starting at the starting corner) you will always move to a corner which is distance $2$ away from the goal. Moving from a distance $2$ away you will either move to a distance $3$ away with probability $\frac{1}{3}$ or get closer to a distance $1$ away with probability $\frac{2}{3}$, and so on... If you are already at the goal you stop moving.
Let $f(n)$ be the expected remaining number of moves to get to the end when you begin at a distance $n$ away.
We arrive at the following system of equations:
$$\begin{cases}f(0)=0\\f(1)=\frac{1}{3}f(0)+\frac{2}{3}f(2)+1\\f(2)=\frac{2}{3}f(1)+\frac{1}{3}f(3)+1\\f(3)=f(2)+1\end{cases}$$
Solving the system of equations for $f(3)$ yields the answer you are after as being $10$