Given
Gravitational force is given by,

Where m and M are the masses of the objects, R is the distance between them and G is the gravitational constant.
The gravitational force of the star on planet 1,

The gravitational force of the star on planet 2,

Ratio:
The ratio of gravitational forces F₂ : F₁ = 1 : 4