>>...when you divide the number by 9 there are 4 left over...<<
That says the number has to be 4 more than a multiple of 9
The multiples of 9 are
{9,18,27,36,45,54,63,72,81,90,...}
The numbers which are 4 more than a multiple of 9 are
Possible answers: {13,22,31,40,49,58,67,76,85,94,...}
So the number must be one of those.
>>...when you divide the number by 8 there are 2 left over...<<
That says the number has to be 2 more than a multiple of 8
The multiples of 8 are
{8,16,24,32,40,48,56,64,72,80,88,96}
The numbers which are 2 more than a multiple of 8 are
Possible answers: {10,18,26,34,42,50,58,66,74,82,90,98}
So the number must be one of those.
The only number common to both sets of possible answers is 58. However
we only took the numbers up to 100. It may be that there would be other
numbers is common if we took higher numbers. But let's see if 58 satisfies
the other requirement. If not we'll have to get more elements of those
sets.
>>...when you divide the number by 5 there are 3 left over...<<
That's true of 58 because it's 3 more than 55 which is a multiple of 5.
So we didn't have to go higher to find the answer.
Answer: 58.
Edwin