I have a home made astronomical telescope with 100 cm objective lens and 5 cm eyepiece.when viewing an object in infinity the distance between eyepiece and objective is 105 cm. So how could I calculate distance between objective and eyepiece for and far away object.For example a planet 1 AU from earth how much should be the distance between objective and eyepiece ?
1 A.U. is same as infinity. The difference in terms of eyepiece position is infinitesimal, you can't measure it. Anything beyond a few kilometers away is pretty much "at infinity".
Regardless of that - from the practice of designing and building telescopes, calculations only offer you a starting point. You do the math, and the distance is 105 cm. But in practice lenses will deviate from the ideal focal length. Even if they didn't deviate at some temperature, put them in a cold environment, and the focal length will change a fraction of mm.
So take the calculations as a starting point, and build the instrument in such a way as to allow fine adjustments of the position of the eyepiece. There's a device called focuser that allows such fine adjustments. Or simply rely on friction to move the eyepiece back and forth until the image looks best, and hold it there.
When using the instrument in practice, you'll forget the ideal distance. What you will do is adjust the position of the eyepiece until the image looks best. You will do that every time you observe, and often multiple times during the same observation.
If you want some math, take a look at the thin lens equation, and apply it to the objective lens.
f = focal length of the lens
o = distance from lens to object
i = distance from lens to image
Then the thin lens equation is:
1/f = 1/i + 1/o i = 1/(1/f - 1/o)
If o = infinity, then i = f.
But what happens if o = 1 A.U.?
i = 1/(1/1 - 1/(1.5 * 10^11)) = 1.0000000000067 meters
The difference is something like 6.7 * 10^-12 meters. It's smaller than an atom.
Astronomical objects are so far away that they focus the same point as an object at infinite distance. In fact any object more than a hundred metres away or so can be treated as being an infinite distance.
To quantify this consider the focal distance equation:
If the focal distance = 1m, and the object distance $d_o$ = 1AU = $150\times 10^9$m
The the image distance ($d_i$) will be 100.000000001cm (less than one atom different)