To solve these types of question you need to construct a table. In this case you need a table of 6 columns and column names are Q2, Q1, Q0, D2, D1, D0 and then write the input to each D flipflop over them, like D2 input is Q1 EX-NOR Q0, D1 input is Q2 and D0 input is Q1.
This is an easy way to solve sync counter question.