Answer: Focal length of converging lens = 40 - 15 = 25 cm.
Explanation: Basic rules to draw ray diagrams in lenses are:
1) Rays coming or incident parallel on the lens form the image at the focus of lens on another / opposite side
2) Rays originating from focus of the lens will pass parallel after refraction through lens.
As shown in attached figure, parallel rays falling on the diverging lens will form an imaginary image on the focus of diverging lens at 15 cm on opposite side.
Rays through the converging lens will be parallel after refraction if and only if rays are originating from the focus of the lens.
Hence focus of diverging lens and converging lens should coincide or a common focus point is required that acts the image point for diverging lens and object point for converging lens.
So, focal length of diverging lens = 15 cm
Focal length of converging lens = Distance between lenses - focal length of diverging lens
Focal length of converging lens = 40 - 15 = 25 cm.