The following calculation was found in the Royal book of accounts. If A and B are digits, then find their value.