The two digits in Jack's age can be represented as such:
AB
The two digits in Bill's age can be represented as:
BA
Note that those are not multiplications, but a representation of the two digits of their ages.
Now, Jack's age is equal to 10A+B. This is because of the place values of each number. For example, 72 = 7*10 + 2. By the same logic Bill's age is 10B+A.
In five years Jack will be twice as old as Bill will be then:
Jack + 5 = 2(Bill + 5)
Substitute for Jack and Bill:
10A+B+5 = 2(10B+A+5)
10A+B+5 = 20B+2A+10
8A = 19B+5
Now it's just a matter of checking which values of A and B work here, because they both have to be integers between 0-9, right? To make it easier, divide each side by 8 to solve for A:
A = (19B+5)/8
Here is the key: Since A has to be an integer, the numerator of that fraction must be a multiple of 8 so that the fraction reduces properly. What values of B make this work? I just tried everything from 0-9. The only ones that produced a multiple of 8 on top are:
1: 24/8 = 3
9: 176/8 = 22
Of course, we could have stopped earlier because obviously A can't be 22, it has to be less than 10 because it is one digit of a number.
Now we have discovered that B is 1 and A is 3, so jack's age is 31 and Bill's age is 13. Try it: in five years, Jack will be 36 and Bill will be 18.
If anyone can do this faster or more clearly, please post a response because I know this was kind of messy.
Ted