I'm assuming you're over the real numbers.
Suppose $B$ is singular and take $v\ne0$ such that $Bv=0$; then
a contradiction. Therefore $B$ is nonsingular.
In order to exclude the other cases, let's see whether $A$, $A+2I$ or $B+2I$ can be the zero matrix.
The matrix $A$ can be the zero matrix, because
0 & 2 \\
-1 & 0
Also $A+2I$ can be the zero matrix: the identity to satisfy would be
and the matrix
2 & -1 \\
2 & 0
satisfies it. I looked for a matrix with trace $2$ and determinant $2$, so Hamilton-Cayley solves the problem.
Just for completeness, the same computations can be performed over any field, with the same result, provided the field doesn't have characteristic $2$. Indeed, the initial contradiction we found is definitely not such when $2=0$.
In this case the identity becomes $B^2+AB=0$ and we see that $B$ can as well be the zero matrix, with $A$ any matrix at all. If $B$ is invertible, then $A=B$.
There is no case distinction for $A+2I=A$ and $B+2I=B$. Thus in the case of characteristic $2$, none of the four conditions is forced.