In what ratio the mass 4m should be split so the value of gravitational force comes maximum for a fix distance d between the masses?

F=G(4m-x)/r^2
G/r^2(4m-x^2)

let mass 4m be Z

F=G(m1*(Z-m1)/d^2
Using calculus...
dF/dm1=0=G(Z-m1)/d^2 -m1/d^2)

solving for m1,
Z-m1-m1=0
m1=Z/2

So split into 2m, and2m.

Now if you don't know the wonderful world of calculus, then plot the following parabola, and see where it is max:
F=G(m1*(Z-m1)/d^2
k=Z(m1)-(m1)^2