NFA · Regular
Contains a square of length 4
Accept any word containing xx where x is two letters — abab, aaaa, baba, bbbb. The machine guesses where the square starts, remembers the two letters of x, and checks that they come again.
The author’s examples, run
aaaa → acceptababb → acceptaaaaaa → acceptaaaaaaabba → acceptbaaa → rejectbbabb → rejectaabaaa → rejectaaabaaabba → reject