Well, the satisfying assignment of "(Xp <-> a)" are those where both Xp and a hold or are both false. So input a leads to states where p holds next, and input !a leads to states where p is false next. Variable q is a don't care and can become true or false.