A679B is a 5-digit number which is divisible by 72
So, it is divisible by all the factors of 72, that is 2, 3, 4, 6, 8, 9, 12, 24, 36.
Since it is divisible by 8, its last 3 digits are divisible by 8
So, 79B is divisible by 8.
B = 2 is the only number which satisfies this condition
The divisibility rule for 9 is that the sum of its digits must be divisible by 9.
So, A + 6 + 7 + 9 + 2 = 24 + A
The nearest number which is divisible by 9 is 27
Then, 24 + A = 27
⇒A=27−24=3
So, A = 3 and B = 2