Prove that $\det(A^{2019} +B^{2019} )$ and $\det(A^{2019} -B^{2019} )$ are divisible by $4$
The problem statement in general is false if $A$ and $B$ do not commute. E.g. consider $$ A=\pmatrix{1&-1\\ 2&-1}, \ B=\pmatrix{0&-1\\ 1&0}. $$ Then $A^2=B^2=-I$, so that $$ \det(A)=\det(B)=1\ \text{ and } \ \frac14\det\left(A^2+B^2\right)=\frac14\det(-2I)=1. $$ Yet, as $A^{2019}=(A^2)^{1009}A=(-I)^{1009}A=-A$ and the analogous holds for $B$, we have \begin{aligned} \det\left(A^{2019}+B^{2019}\right) =\det(-A-B)=\det(A+B) =\det\pmatrix{1&-2\\ 3&-1} =5, \end{aligned} which is not divisible by $4$. One can easily verify that $AB\ne BA$ in this example.
Nonetheless, the problem statement is true if $AB=BA$. This can be proved easily be considering the eigenvalues of $A,\ B$ and $A^2+B^2$.
The other answer demonstrates that the result is false unless $AB=BA$; here's a proof in that case. Note that $A^2+B^2=\dfrac12\left((A+B)^2+(A-B)^2\right)$. Therefore, $$4=\det(A^2+B^2)=\frac14\det\left((A+B)^2+(A-B)^2\right),$$ i.e. $$\det\left((A+B)^2+(A-B)^2\right)=16.$$ But because $\det(X+Y)=2\det X+2\det Y-\det(X-Y)$ for any two $2\times 2$ matrices $X,Y$, we have $$\det\left((A+B)^2+(A-B)^2\right)=2\det(A+B)^2+2\det(A-B)^2-\det(4AB),$$ so by the condition, $$16 = \det(A+B)^2+\det(A-B)^2.$$ Now, $A+B$ and $A-B$ are both integer matrices, so their determinants squared are nonnegative perfect squares. The only two nonnegative perfect squares that sum to $16$ are $0,16$, therefore one of $\det(A+B),\det(A-B)$ is $0$ and the other is $\pm 4$. We are done because of the factorisations $$A^{2019}+B^{2019}=(A+B)(A^{2018}-A^{2017}B+\dots+B^{2018}),$$ $$A^{2019}-B^{2019}=(A-B)(A^{2018}+A^{2017}B+\dots+B^{2018}).$$