The idea
A plane mirror produces an upright virtual image as far behind the mirror as the object is in front.
A pencil is 12 cm in front of a plane mirror. How far is it from its image?
The image appears 12 cm behind the mirror. The object and apparent image are 24 cm apart along the perpendicular.