Ah. What you've done there isn't a dilution/undilution factor. You just found a fraction of the total amount of HCl present in 100ml. Basically you've said "Out of 20 apples, I have 2/20 = 2 apples". And if you look at the units, you divided a volume by a volume which cancels all units and makes it into a ratio. Since you already found the total amount of HCl present in 100ml (i.e. 0.125mol), the ratio you found multiplied by that total gives you 0.025mol. This is a correct way of doing this, but this isn't a dilution factor. :p
A dilution factor is something like, "A 20.00mL sample of wine is diluted up to a 750.0mL volumetric flask with distilled water. An aliquot of 20.00mL of this diluted solution was titrated against 1.25M of HCl solution and an average titre of 5.85mL was found. Find the original concentration of ethanoic acid in wine." This is a basic titration question which involves a dilution factor of 750.0mL/20.00mL = 37.5. This means the concentration you find for the aliquot is 1/37.5 of the original concentration.
A good way I like to use is to think that, to 'undilute' something, the bigger number is the numerator and the denominator is the smaller number. And to dilute something, the smaller number is the numerator and the denominator is the bigger number. <-- Not sure if this always works out like this though. :p