Answer
See the detailed answer below.
Work Step by Step
We know that the lateral magnification is given by
$$m=-\dfrac{s'}{s}\tag 1$$
We also know that the longitudinal magnification is given by
$$M= \dfrac{ds'}{ds}\tag 2$$
See problem 82 in your textbook in this chapter, it refers to the same $M$.
For the thin lens,
$$\dfrac{1}{s}+\dfrac{1}{s'}=\dfrac{1}{f}$$
Solving for $s'$,
$$s'=\left[ \dfrac{1}{f}-\dfrac{1}{s} \right]^{-1}=\left[ \dfrac{s-f}{fs} \right]^{-1}$$
$$s'=\dfrac{fs}{s-f} \tag 3$$
Plugging $s'$ from (3) into (1),
$$m=-\dfrac{ 1}{s}\cdot \dfrac{fs}{s-f}$$
$$m=-\dfrac{ f}{s-f} \tag 4 $$
Plugging $s'$ from (3) into (2),
$$M= \dfrac{d }{ds}\left[\dfrac{fs}{s-f}\right]=\dfrac{f(s-f)-fs}{(s-f)^2} $$
$$M= \dfrac{fs-f^2-fs}{(s-f)^2} =-\dfrac{f^2}{(s-f)^2}$$
$$M= -\left[\dfrac{f }{(s-f)}\right]^2=-m^2\tag{See (4)}$$
$$\boxed{M= -m^2}$$