As per logic perspective, we think values either as TRUE or FALSE, I.e: 0 or 1.
So here we can assume 0 or 1 only, for A and B respectively.
So consider A=1 and B=0,
Now put the values in asking law,
LHS=A.(A+B)
=1.(1+0)
=1.(1)
=1=A ...[because A=1]
=RHS
Now you are thinking, why I cannot take value of B=1 and A=0,
Yes!! You are independent to that,
If you take A=0 then multiply with adjacent terms in bracket, your whole answer will be zero, again, lhs will be equal to rhs.
So you will get answer as the value of A in every attempt.
Now for A+(A.B)=A
If A=1, B=0
Put, 1+(1.0)=1 [A=1]
Or if A=0, B=1
Then,
A+(A.B)=A
0+(0.1)=0 [A=0]
Hence you will get answer as A alwasy!!!!