Fill the 124-gallon jug 4 times, emptying it each time into the 45-gallon jug. After the 45-gallon jug has been filled 11 times, there will be 1 gallon remaining in the 124-gallon jug.
_____ Mathematically, this works fine. In practice, you're looking for a 1-gallon difference after handling 495 gallons of water. That's about 0.2% of the total amount of water transferred. Any error along the way will substantially affect the outcome.