We know distance of the object from the lens D0=10 cm, height of the object H0=3 cm, focal length f=2 cm and we want to know the image height Hi.
First we have to calculate the distance of the image Di from the lens using the lens equation:
(1/f)=(1/D0)+(1/Di)
(1/Di)=(1/f)-(1/D0)=(1/2)-(1/10)=4/10
Di=10/4=2.5 cm.
Now we can calculate height of the image Hi from the magnification formula:
M=-(Di/D0)=(Hi/H0)
Hi={-(Di/D0)}*H0={-(2.5/10)*3}=-0.75 cm.
So height of the image is Hi=-0.75 cm. The minus sign tells us the image is inverted.