Answer
See the answer below.
Work Step by Step
The author needs us to justify that the image distance is positive for a real image and negative for a virtual image.
He asks us to use any figures we need, so we will use figures (23–39), (23–40), and (23–43) in our textbook.
We have here 3 cases:
1) When we have a diverging lens.
2) When we have a converging lens:
a) when $d_o\gt f$
b) when $d_o\lt f$
In these 3 cases, we will use the same formula of
$$\dfrac{1}{f}=\dfrac{1}{d_o}+\dfrac{1}{d_i}$$
And since we need to find the image distance for the three cases, we need to solve for $d_i$.
$$\dfrac{1}{f}-\dfrac{1}{d_o}=\dfrac{1}{d_i}$$
$$d_i=\left[\dfrac{1}{f}-\dfrac{1}{d_o}\right]^{-1}\tag 1$$
1) In the first case, as we see in figure (23–39); We can see that $d_o\gt f$ and we know from the first law of sign conventions that the focal length is negative for diverging lenses, so $f\lt 0$.
Plugging these data into (1) by plugging some numbers to see if the final result is negative or positive.
Let's assume that the focal length is 5 cm and that the object is 6 cm.
Thus;
$$d_i=\left[\dfrac{1}{-5}-\dfrac{1}{6}\right]^{-1}=\bf -2.73\;\rm cm$$
And since the image here is virtual, so it is obvious that for the virtual images the image distances must be negative.
2-a) In the second case, as we see in figure (23–40); We can see that $d_o\gt f$ and we know from the first law of sign conventions that the focal length is positive for converging lenses, so $f\gt 0$.
Plugging these data into (1) by plugging some numbers to see if the final result is negative or positive.
Let's assume that the focal length is 5 cm and that the object is 6 cm.
Thus;
$$d_i=\left[\dfrac{1}{5}-\dfrac{1}{6}\right]^{-1}=\bf +30\;\rm cm$$
And since the image here is real, so it is obvious that for the real images the image distances must be positive.
2-b) In the third case, as we see in figure (23–43); We can see that $d_o\lt f$ and we know from the first law of sign conventions that the focal length is positive for converging lenses, so $f\gt 0$.
Plugging these data into (1) by plugging some numbers to see if the final result is negative or positive.
Let's assume that the focal length is 5 cm and that the object is 4 cm.
Thus;
$$d_i=\left[\dfrac{1}{5}-\dfrac{1}{4}\right]^{-1}=\bf -20\;\rm cm$$
And since the image here is virtual, so it is obvious that for the virtual images the image distances must be negative.