# Is it possible to calculate image distance by knowing magnification and focal length?

There is an equation in Physics about photography which is all about lenses.

${\rm magnification} = \frac{\rm image\,distance}{\rm object\,distance}$

Assuming we know the magnification, in order to calculate distance of object we need to know distance of image in the lens.

However, I couldn't find any information on web regarding to what image distance is equal to in a photographic lens.

It should be between $F$ and $2F$ (knowing photographs are taken beyond $2F$), and in between the lens glass and sensor of the camera.

How can we make sure about the distance of image in the camera?

Treating the camera lens as a simple thin lens (this is an approximation), then the image distance, $v$ and the object distance, $u$, are related by$$\frac{1}{u}+\frac{1}{v}=\frac{1}{f}$$in which $f$ is a constant for the lens, called its focal length.
Focusing the camera amounts to varying the distance, $v$, between the lens and the light-sensing ccd-array in order to satisfy the equation, for the given distance, $u$ of the object from the lens. So the image distance isn't fixed, as you seem to be suggesting.