You cannot make a field conditional on itself, so what you want cannot be done. I would suggest rethinking how this works.
A quick thought is to use a radio button where you select if you want to enter a value for A or a value for B (or both) and then make both A and B conditional on the radio field.