truth table for D flip flop with control variables x and y
You should create a K-map with control and current state as your axis. From that you can derive the next state. 
$$
\begin{array}{lc|cccc} \
&amp;&amp; \rlap{AB_\text{(current state)}} \\
   &amp;    &amp; 00 &amp; 01 &amp; 11 &amp; 10 \\\hline
XY &amp; 00 &amp; \color{blue}{1}\color{red}{1} &amp; \color{blue}{0}\color{red}{0} &amp; \color{blue}{1}\color{red}{0} &amp; \color{blue}{0}\color{red}{1} \\
   &amp; 01 &amp; \color{blue}{0}\color{red}{1} &amp; \color{blue}{1}\color{red}{0} &amp; \color{blue}{0}\color{red}{0} &amp; \color{blue}{1}\color{red}{1} \\
   &amp; 11 &amp; \color{blue}{0}\color{red}{1} &amp; \color{blue}{1}\color{red}{1} &amp; \color{blue}{1}\color{red}{0} &amp; \color{blue}{0}\color{red}{0} \\
   &amp; 10 &amp; \color{blue}{1}\color{red}{0} &amp; \color{blue}{0}\color{red}{0} &amp; \color{blue}{0}\color{red}{1} &amp; \color{blue}{1}\color{red}{1} \\
\end{array}
\\
\begin{align}
\color{blue}{a}_\text{(next state)} &amp; = \bar{Y}\bar{A}\bar{B} + Y\bar{A}B + \bar{X}\bar{Y}AB + \cdots_\color{blue}{\text{(other blue groupings)}} \\
\color{red}{b}_\text{(next state)} &amp; = XY\bar{A} + X\bar{Y}A + \cdots_\color{red}{\text{(other red groupings)}} \\
\end{align}
$$

Note: To ensure I'm not doing your homework, the equations are intentionally incomplete and the k-map entries may/may-not be accurate. If finding the groups from from a double variable is challenging, split into seperate k-maps (one for red entries, the other blue).