Write the digits of a as "pqrs". The a= 1000p+ 100q+ 10r+ s and b= 1000s+ 100r+ 10q+ p. a= 4b becomes 1000p+ 100q+ 10r+ s= 4(1000s+ 100r+ 10q+ s).

If p, q, r, and s could be any real numbers there would be an infinite number of solutions. But here we know that p, q, r, and s must be integers from 0 to 9 (and, presumably, neither p nor s are 0).