The answer of 4,000 you were given is correct.
You can't break the intervals the way you did because that changes the number of possible locations of the string/number "25".
Here is how I suggest you visualize the problem
You want to determine how many places the string/number "25" can occur in a 6 digit number restricted to 100,000.
100,000 gives you 6 digit places but, the string/number "25" cannot start in the first digit since the first digit is limited/restricted to "1". Therefore, the situation is as follows, using underscores for digit placeholders
1 _ _ _ _ _
The pair of digits "25" can only occur in the places shown below
1 _ _ _ 25
1 _ _ 25 _
1 _ 25 _ _
1 25 _ _ _
The above shows that the string/number "25" can only occupy 4 possible places.
Now, no matter where the string/number "25" is found there will be 3 digit placeholders left to fill in. Each of the digit placeholders can be filled in with 0 through 9, that is, 10 digits.
Therefore, the number of arrangements is 4 times 10x10x10 (permutation of 10 objects/digits 3 at a time, that is, 10^3), therefore, there are 4000 possible arrangements of the string/number "25" between 1 and 100,000.
Hopefully that helps you see why your method doesn't work.