If $v$ is an eigenvector of $B$ with eigenvalue $λ$, then $A^2v+λ^2v=λAv$,
$$
(A-λωI)(A-λ\bar ωI)v=0,~~ ω^2-ω+1=0,
$$
so that $v$ is also an eigenvector of $A$, with eigenvalue $λω$ or $λ\bar ωI$. If $B$ has 2 (strict) eigenvectors, then $A$ and $B$ are therefore simultaneously diagonalizable, thus commute, thus already $AB-BA$ is zero.
In the other case $B$ has a repeated eigenvalue which has to be real, with a real eigenvector.
There is then a real basis change so that in the new basis $B=\pmatrix{λ&1\\0&λ}$, $λ$ is real with eigenvector $e_1$. The likewise changed matrix $A$ is still real and consequently has, by the above observation, the pair of conjugate eigenvalues $λω$, $λ\bar ω$, one of them with eigenvector $e_1$. However, that is impossible, as $Ae_1$ is real and at the same time equal to the strictly complex $λωe_1$.