If you divide it into a truth table ...
A B !A (A and B) A! or (A and B)
0 0 1 0 1
0 1 1 0 1
1 0 0 0 0
1 1 0 1 1
You can see that the result is true in all cases except A and !B, without the need to know / remember any rules of Boolean algebra. "Except" just "not," so ... !(A and !B)...
, !A or (A and B) , , , ...