By definition of ideal if and then (I'm assuming your ring commutative, but I believe if A,B are two sided ideals the proof still works)
How does my reasoning sound?
By definition of ideal, multiplied by any element of will be in A and will also be in B. So, multiplied by any element in will be and same for . Because the problem tells us that the union of A and B is 0, then because , .
Hows this sound?