m₁ = mass of first ocean liner = 10 x 10⁶ kg
m₂ = mass of second ocean liner = 20 x 10⁶ kg
r = distance between two ocean liners = ?
F = force between the two ocean liners = 1.0 N
G = gravitational constant = 6.67 x 10⁻¹¹ Nm²/kg²
Gravitational force of attraction between the two ocean liners is given as
F = G m₁ m₂/r²
inserting the values
1.0 = (6.67 x 10⁻¹¹) (10 x 10⁶) (20 x 10⁶)/r²
r² = (6.67 x 10⁻¹¹) (10 x 10⁶) (20 x 10⁶)
r² = (6.67 x 10⁻¹¹) (200 x 10¹²)
r² = 13340
r = √13340
r = 115.5 m