GM - The question says:
"There's a mystery 5-figure number which, when multiplied both by 7 and by any single-digit number, always produces an answer where every digit is the same as that single-digit number. What's that mystery 5-figure number?"
Taking 4 as an example for the single-digit number, that means that 28 (= 7 x 4) times the mystery number must come to 4 or 44 or 444 or 4444, etc. But since a 5 digit number must be between 10000 and 99999, the required string-of-4s number must be between 280,000 and 2,800,000, i.e. 444,444
Dividing 444,444 by 28 gives 15873.
Checking other examples confirms the answer. e.g.
7 times 8 x 15873 = 888,888.
That way of proving it (by exhaustion) would score poorly in a maths exam (because it lacks 'elegance') but it's the simplest way of finding the required answer here.