DFA of (aa+bb)(a+b)* + (a+b)*(aa+bb)?
The DFA starts by reading the first two characters. If they happen to be the same, then it goes to an accepting state and just stays there. Otherwise, it keeps track of the last two characters of the word being read, being in an accepting state whenever they are the same.

Instead of writing a state diagram, here are the Myhill&ndash;Nerode equivalence classes of your language (given as regular expressions), which can be converted into a DFA with the same number of states as the number of equivalence classes:


$q_0$: $\epsilon$.
$q_1$: $a$.
$q_2$: $b$.
$q_3$: $(aa+bb)(a+b)^*$.
$q_4$: $(a+b)^*aa \setminus (aa+bb)(a+b)^*$.
$q_5$: $(a+b)^*ab \setminus (aa+bb)(a+b)^*$.
$q_6$: $(a+b)^*ba \setminus (aa+bb)(a+b)^*$.
$q_7$: $(a+b)^*bb \setminus (aa+bb)(a+b)^*$.


The initial state is $q_0$, and the accepting states are $q_3,q_4,q_7$.

Here is the transition function:
$$
\begin{array}{c|cccccccc}
&amp; q_0 &amp; q_1 &amp; q_2 &amp; q_3 &amp; q_4 &amp; q_5 &amp; q_6 &amp; q_7 \\\hline
a &amp; q_1 &amp; q_3 &amp; q_6 &amp; q_3 &amp; q_4 &amp; q_6 &amp; q_4 &amp; q_6 \\
b &amp; q_2 &amp; q_5 &amp; q_3 &amp; q_3 &amp; q_5 &amp; q_7 &amp; q_5 &amp; q_7
\end{array}
$$