Let $A,B \in \mathbb{C}^{2 \times 2} \setminus \{O_2\}$, where $AB=-BA$ and $\det(A+B)=0$. Prove that $\operatorname{tr}(A) = \operatorname{tr}(B) = 0$ (where $\operatorname{tr}$ is the trace).
My attempt
Let $C=A+B$. Then, using the Cayley–Hamilton for $C$:
$C^2 -Tr(C)C + \det(C)I_2=0$ therefore $C^2=Tr(C)C$ and $(A+B)^2=(Tr(A) + Tr(B))(A+B)$ then $$A^2 + B^2=(Tr(A) + Tr(B))(A+B) \tag1$$
Using Cayley–Hamilton for $A$ and $B$ in (1) one gets: $$ -\det(A)I_2 -\det(B)I_2=Tr(A)B + Tr(B)A \tag2$$
Applying trace to (2): $$-\det(A) -\det(B)=Tr(A)Tr(B) \tag3$$ So I have to prove $\det(A)=-\det(B)$ and here I got stuck.
Update 1
Showing $Tr(A)=Tr(B)$ is enough to finish the proof.
Update 2
Following an idea by @Dietrich Burde
Suppose $A$ is invertible. Then $B=A^{-1}(-B)A$ and $Tr(B)=Tr(A^{-1}(-B)A)=Tr(A^{-1}(-BA))=Tr((-BA)A^{-1})=Tr(-B)=-Tr(B)$.
Therefore $Tr(B)=0$. Now, from (3) one gets $\det(A)=-\det(B)$ then from (2) $Tr(A)=0$
Similar for $B$ invertible.
If both matrixes are singular then, from (3) one of $Tr(A)$ or $Tr(B)$ is zero and from (2) the other one is also zero.
Since the matrices are $2\times 2$, a direct computation is also successful. This is not the perfect solution, but shows that the claim is correct. Let $$ A=\begin{pmatrix} a_1 & a_3 \\ a_2 & a_4 \end{pmatrix},\quad B=\begin{pmatrix} b_1 & b_3 \\ b_2 & b_4 \end{pmatrix}. $$ Then $AB+BA=0$ and $\det(A+B)=0$ are equivalent to the system of polynomial equations $$ 2a_1b_1 + a_2b_3 + a_3b_2=0 \\ a_1b_3 + a_3b_1 + a_3b_4 + a_4b_3=0 \\ a_1b_2 + a_2b_1 + a_2b_4 + a_4b_2=0 \\ a_2b_3 + a_3b_2 + 2a_4b_4=0 \\ a_1a_4 + a_1b_4 - a_2a_3 - a_2b_3 - a_3b_2 + a_4b_1 + b_1b_4 - b_2b_3=0 $$ Assume first that $a_1=0$. Then Buchberger's algorithm gives either $B=0$ or $A=0$ or $a_4=a_1=0$, $b_1+b_4=0$, i.e., $tr(A)=tr(B)=0$ and $b_4^2 + b_2b_3 + a_2a_3=0$.
In the second case, we may assume that $a_1=1$. Then Buchberger's algorithm immediately gives $1+a_4=0, b_1+b_4=0$, or $B=0$. This finishes the proof.
Something more elegant for a special case: Suppose that $A,B$ are invertible. Then $AB=-BA$ means that $B=A^{-1}(-B)A$, so that $B$ and $-B$ are similar. In particular we obtain $tr(B)=0$. Similarly $tr(A)=0$.