Two way deterministic pushdown automaton accepting word consisting of two equal words
Here are the two basic ideas.
(1) After checking that the input length is even, move to the middle position of the input.
The trick to find that position uses the stack in a similar way that we recognize the language $\{\;a^{2n}b^n \mid n \ge 0\;\}$.
(2) Then check that the two halves are equal.
Here the stack is used in a similar way that one recognizes the language $\{\; ww^R \mid w\in\{a,b\}^*\;\}$, except that the head does not move forward in both cases.