Answer :

25=5x5 -- the same as [tex]5^2[/tex]
125=5x5x5 -- the same as [tex] 5^{3} [/tex]

As we can see there are 2 5s in the prime factors of 25 and 3 in the prime factors of 125. Therefore we pick the maximum number that is in both, which is 2, to get the HCF.

[tex]5*5=25[/tex]

The HCF of 25 and 125 is 25.