So we want to know the height Hi of the image if we know object distance Do=8 cm, image distance Di= 12 cm and the height of the object H0= 4 cm. The magnification formula is M=(Hi/H0)=(Di/Do). By multiplying the equation with H0 we get Hi=(Di/Do)*H0. Now we input the numbers and get: Hi=(12/8)*4=6 cm. So the height of the image Hi=6 cm.