Can anyone solve? Thank you

Answer:
The rod is stretched because there is a larger gravitational force on the mass closest to mass M.
F = G M m / r^2 - G M m / (r + l)^2 the difference of the forces on m's
F = G M m [1 / r^2 - 1 / (r + l)^2]
[1 / r^2 - 1 / (r + l)^2] = (r^2 + 2 r l + l^2 - r^2 / [r^2 (r + l)^2]
= (2 r l + l^2) / [r^2 (r + l)^2]
if l is small compared to r = (2 r l ) / [r^2 (r + l)^2]
= (2 r l ) / [r^4 + 2 r^3 l ]