If everything is in meters and kilograms, then the gravitational force
between 2 masses is
F = G M₁ M₂ / R²
G = 6.67 x 10⁻¹¹
M₁ and M₂ = the masses of the two masses
R = the distance between their centers.
When we plug in 3 x 10⁻¹⁰ for the force, and 0.45 for the distance,
we get the product of the 2 objects M₁M₂ = about 0.911 , and
that's as far as we can go without some more information.
The question says that the two masses add up to 4.0 kg.
So now we know that M₁M₂ = about 0.911 and (M₁ + M₂) = 4.0 kg.
With this, we immediately step into a big squishy quadratic equation,
whose solutions are:
one mass = 3.758 kg
the other mass = 0.242 kg .