As we know that gravitational force on two planets will be given as
let
mass of star = M
mass of two planets are m1 and m2
their distance from star is r1 and r2

since the gravitational force of star is given on two planets to be same
so here we can say

now if the ratio of mass and distance is same then we can say that closer planet must have lesser mass to hold good for above equation
so correct answer will be
B) Yes, it is possible if the closer planet has less mass.