You make a list of the possible states and then you can assign whatever labels you want to the result. A simulation may be helpful in creating a list of possible states, and noting that each flip-flop can be placed in the clear or "0" state by the reset signal, means you have a defined starting value. Next thing is to determine if any possible states are unreachable. If there are unreachable states, then you will need fewer than eight labels for the valid states.
ETA: State 7 = 0b111 is an unreachable state.
If X : = 0, the after 2 clocks the is equal to 0
From an initial state = 0b000, the state sequence is (0 1 2 5 4 6 5)* as lona as X=1