A*(A+B)? No logic to me at all.
Remember: All numbers here is not the numbers we know in the regular Math.
If saying 2+3=10 --> 2(2+3)--> the 2 implies 2*2 in algebra, the 3 implies 2*3 too.
7+2=63, the 2 in this equation implies 2*7 in algebra.
So that,the 2 has different meanings.
It's only good for "腦筋急轉灣" to have fun.
It's not derived by strict math logic.