If $Z=E\cap D$, wuth $E,D$ divisors on $X$, we have an exact sequence, $0\to O_X(-D-E)\to O_X(-D)\oplus O_X(-E)\to O_X\to O_Z\to 0$. So, Whitney sum formula says, $c(O_Z)c(O_X(-D)\oplus c(O_X(-E))=c(O_X)c(O_X(-D-E))$, where $c$ is the total chern class. If we denote by $a=c_1(O_X(D))$, $a_2=c_1(O_X(E))$, we get, $c(O_Z)(1-a)(1-b)=1-(a+b)$. From this, you can calculate all the chern classes of $O_Z$ easily by elementary algebra. We have $c(O_Z)=(1-(a+b))(1-a)^{-1}(1-b)^{-1}= (1-(a+b))(1+a+a^2+a^3)(1+b+b+b^2+b^3)$. Thus $c_1(O_Z)=0$ as you said. $c_2=a^2+ab+b^2-(a+b)^2=-ab$, again, this is the class of $-[Z]$ as you said. Finally, $c_3=a^3+a^2b+ab^2+b^3-(a+b)(a^2+ab+b^2)=-ba^2-ab^2=-(a+b)ab$.