Ehrenfeucht-Fraïssé games, possible mistake in example
Spoiler wins the $3$-move EF game by picking $a_1$, $a_2$, $a_3$ in any order. You can confirm this by observing that there is a formula of quantifier rank at most $3$ that is satisfied by $A$ but not by $B$, namely:

$$
\exists x\exists y\exists z \ .\  x\neq y \wedge y \neq z \wedge z \neq x \wedge r(x, y) \wedge r (y, z) \wedge r(z, x)
$$

where $r$ is the adjacency relation. Since $A$ has $3$ vertices and $B$ has $4$, Spoiler will also win any $k$-move game for $k\ge 4$, probably the question meant to ask about the $2$ and $3$-move games respectively, instead.