DFA $M_1$ over {$0,1$}, that begins with $00$ or $11$ having regular expression $(00+11)(0+1)^*$
DFA $M_2$ over {$0,1$} that ends with $00$ or $11$ having regular expression $(0+1)^*(00+11)$
DFA $M$ using cross product of $M_1 \times M_2$ having start state as {$x_0,y_0$} and mark final state as any state contain $x_3$ or $y_3$ or $y_4$( and do minimization)