Hi Blue C.,
Use the mirror equation 1/d0 +1/di = 1/f with f = 40 cm, d0 = 20 cm:
1/di = 1/40 - 1/20 = -1/40, therefore di = -40 cm. The minus sign means the image is behind the mirror.
Use ho/hi = do/di, ho = 5*20/-40 = -2.5 cm.
For magnification use m = -di/do = -(-40)/20 = +2. So the image is twice as large and upright.
I hope this helps, Joe.
Blue C.
Thank you!06/12/22