A:
For k = 1, the expression is 2 + 3 + 5 = 10.
For k = 2, the expression is 4 + 9 + 25 = 38.
For k = 3, the expression is 8 + 27 + 125 = 160.
We observe that 2 is a common factor for all these expressions.
B:
For k = 1, the expression is 3 + 4 + 5 = 12.
For k = 2, the expression is 9 + 16 + 25 = 50.
For k = 3, the expression is 27 + 64 + 125 = 216.
We observe that 2 is a common factor for all these expressions.
Therefore, A = 2 and B = 2.
Hence, A + B = 2 + 2 = 4.