If round ball $A$ and $B$ have weight 55 kg and 25 kg respectively and there distance is 20 meters then what would be the attraction force if we dive these two objects in the water?
I am assuming there is a downwards gravity $g$
There are two components here: downwards gravitational force and horizontal
Downwards Gravitational Force: This would be the weight of the object subtracted from the buoyant force $$\sum F_y=mg-\rho Vg$$ Horizontal Gravitational Force: This is simply our known equation $\sum F_x=\frac{GMm}{r^2}$
Now we simply take the vector sum of these two forces to get the resultant force. Or $$\sum F=\sqrt{F_x^2+F_y^2}=\sqrt{(mg-\rho V g)^2+\left(\frac{GMm}{r^2}\right)^2}.$$
Not sure if this helps get an answer.