Text Explanation
The first condition is less restrictive. Any number ending with a units digit of either 4 or 9 will have a remainder of 4 when divided by 5. That allows for 20 possibilities between 0 and 100:
4, 9, 14, 19, 24, 29, …..89, 94, 99
The second condition is more restrictive. We want numbers that, when divided by 23, produce a remainder of 7. We will multiply 23 by integers, starting with zero, and then add 7.
23*0 + 7 = 7
23*1 + 7 = 23 + 7 = 30
23*2 + 7 = 46 + 7 = 53
23*3 + 7 = 69 + 7 = 76
23*4 + 7 = 92 + 7 = 99
23*5 + 7 = 115 + 7 = 122—too big: this is more than 100
Those five bold numbers are the only five positive integers less than 100 that, when divided by 23, have a remainder of 7. Of those, only one of them also meets the first condition—ending in a 4 or 9, which means that, when it's divided by 5, it has a remainder of 4. Only x = 99 satisfies both conditions, so this is the answer.
x = 99
FAQ: Why do we start the list with 7? Shouldn't it start with 30? (And why is the first number in the other list 4 instead of 9?)
We start the list of possible values of x with 7 because 7 divided by 23 will leave a remainder of 7. That is, if we try to divide a 23 out of 7, we can't. So 23 goes into 7 a total of zero times. And what's leftover after we take zero 23s out of 7? Well, we haven't divided out anything, so there's still 7 leftover.
In other words, 7/23 = 0 (remainder 7).
So maybe x =7, since that works with the second condition given.
The same is true of the 4 starting the other list: 4/5 = 0 (remainder 4). So maybe x = 4, since that works with the first condition given.
FAQ: Can we do this algebraically? I tried using a couple of equations, x = 5q + 4 and x = 23p + 7.
We don't know what the quotient is in each equation (the q and p), and they're not necessarily the same, so this leaves us with three variables in two equations. This causes a problem--unless we have three equations, it's not easy (often impossible) to solve for a system with three variables.
So unfortunately, this approach alone won't get you to the answer, even if it was a good instinct!