We know that the masses experience a 40 N force between them, which is a gravitational force due to their mass. So, if we double their distance between them, the force will decrease due to Newton's Gravitational Law.
Let's use 2d.
As you can notice, the force would be divide by 4, so let's do that.
Therefore, if we double their distance, their force would be 10 N.