# How to calculate average steps needed for state change in a state machine

Hint: Let $a$ be the mean number of steps required to get from Left to Right. Let $b$ be the mean number of steps required to get from Middle to Right.
We have $$a=1+\frac{1}{2}a+\frac{1}{2}b,$$ and $$b=1+\frac{1}{3}a+\frac{1}{3}b.$$