Ratio to maximize force = 1/1
The equation for gravitational attraction is
F = G*m1*m2/r^2
where
G = gravitational constant
m1,m2 = mass of each mass
r = distance between mass centers.
Since the values of G and r are remaining constant as well as the sum of the masses. Let's simplify the problem as follows.
m = mass 1
(1-m) = mass 2
So we're looking for a value of m that maximizes m(1-m) where m is somewhere between 0 and 1. Let's do it now:
F = m(1-m)
F = m - m^2
Now when you're looking to maximize a quantity, that screams "First derivative". So let's calculate that now.
F = m - m^2
F' = 1 - 2m
And set it to 0.
F' = 1 - 2m
0 = 1 - 2m
2m = 1
m = 1/2
So the optimal value of m is 1/2. So m1 = 1/2 and m2 = 1 - 1/2 = 1/2. So the optimal ratio between the two masses to maximize the gravitational force is 1/1.