I think what you mean is, you have 5-digit number in the form of abcde, and the numeral 1 you put will make this a 6-digit number.
If you put 1 at the beginning, new number: 1abcde
If you put 1 at the end, new number: abcde1
If the latter is 3 times bigger, then we can form a simple equation:
3* 1abcde= abcde1
300000+30000a+3000b+300c+30d+3e=100000a+10000b+1000c+100d+10e+1
299999=70000a+7000b+700c+70d+7e
Dividing both sides by 7 -> 42857=10000a+1000b+100c+10d+e
So your 5-digit number is: 42857