Step 1: The set-up and the rays:
Draw the principal axis with two convex lenses on it. The objective is nearer to the object and has the small focal length $f_o$. The eyepiece has a bigger focal length $f_e$.
Place the object AB a little beyond the focus of the objective. Draw one ray from the top of AB parallel to the axis, and one through the centre of the objective.
They meet and form the real, inverted, magnified image A'B' inside the focus of the eyepiece.
From A'B' draw rays that pass through the eyepiece and spread out. Their backward extensions meet and give the virtual image A''B'', which is enlarged and formed at 25 cm from the eye. Mark the angle $\beta$ that A''B'' subtends at the eye.
Step 2: Magnifying power as an angle ratio:
Magnifying power is the angle $\beta$ seen through the microscope divided by the angle $\alpha$ seen with the unaided eye at the near point.
\[ \alpha = \frac{h}{D}, \qquad \beta = \frac{h'}{|u_e|} \]
Here $h'$ is the height of the first image, and $|u_e|$ is its distance from the eyepiece.
\[ m = \frac{\beta}{\alpha} = \frac{h'}{h}\cdot\frac{D}{|u_e|} \]
Step 3: Put in the lens relations:
The first factor, $\dfrac{h'}{h}$, is the objective magnification $\dfrac{v_o}{|u_o|}$.
For the eyepiece, the image is virtual at distance $D$. With sign convention, $u_e$ is negative, and $v_e = -D$. So:
\[ -\frac{1}{D} - \frac{1}{u_e} = \frac{1}{f_e} \quad\Rightarrow\quad \frac{1}{|u_e|} = \frac{1}{D} + \frac{1}{f_e} \]
Multiply by $D$ to get $\dfrac{D}{|u_e|} = 1 + \dfrac{D}{f_e}$.
\[ m = \frac{v_o}{|u_o|}\left(1 + \frac{D}{f_e}\right) \]
The object is very close to $F_o$, so $|u_o| \approx f_o$. The first image is close to $F_e$, so $v_o \approx L$, the tube length.
This gives $m \approx \dfrac{L}{f_o}\left(1 + \dfrac{D}{f_e}\right)$. The large value comes from small $f_o$ and small $f_e$ together with a long tube.
Final Answer:
The magnifying power of the compound microscope for the final image at distance D is:
\[ \boxed{m = \frac{L}{f_o}\left(1 + \frac{D}{f_e}\right)} \]