Step-by-step explanation:
Given that,
Height of object = 4.0 cm
Distance of the object u= -30.0 cm
Focal length = 23 cm
We need to calculate the image distance
Using lens's formula

Where, u = object distance
v = image distance
f = focal length
Put the value into the formula




We need to calculate the height of the image
Using formula of height

Where, h' = height of image
h = height of object



The image is real and inverted.
(b). Now, object distance u = 13.0 cm
We need to calculate the image distance
Using lens's formula

Put the value into the formula



We need to calculate the height of the image



The image is virtual and erect.
Hence, This is required solution.