Good. Now that you know F(u) acting on a material point at x = u of mass m, let there be another rod between x = 2d and x = 3d, of mass m2. What is the net force?
Net force on point mass m? It will depend on the positions of m2 and m bcoz gravitational force is always attractive so there will be two cases ...please tell whether u > 3d...or d<u<2d