.
There are 9 one-digit numbers from 1 to 9 inclusively : 9 digits, in all.
There are 90 two-digit numbers from 10 to 99 inclusively : 180 digits, in all.
There are 900 three-digit numbers from 100 to 999 inclusively : 2700 digits, in all.
Thus, 9 + 180 + 2700 = 2889 places are just occupied by one-digit, two-digits and three-digits numbers.
Starting from the position 2890, the four-digit are placed, each occupies 4 position.
Between 5000-th position and 2890-th position, there are about
=527.75,
and more precisely, 527 four-digit numbers from 1000 to 1526, inclusively.
The next number is 1527, giving its third digit " 2 " at the 5000-th position.
ANSWER. The digit " 2 " is at 5000-th position.