The lens equation implies that for the special case “object width = double focal length “image width = double focal length” applies.

The distance between object point and image point therefore is 4 * focal length (plus main plane distance).

Therefore if an object has the distance X mm and you want to achieve a 1:1 mapping, you should choose f = X / 4 mm!

If you want to achieve a 1:1 image at a 10cm distance, choose a lens with a focal length of 25mm.

We work in units of mm, so the cm first have to be converted to mm: 10cm = 100mm)