Qualcomm Interview Question

mealy and moore state diagram sequence generator, question regarding course project