Kepler's third law states that square of period of revolution (T) of a planet around the sun, is proportional to third power of average distance r between sun and planet i.e. here K is constant.
If the masses of sun and planet are M and m respectively then as per Newton's law of gravitation force of attraction between them is
The relation between G and K is described as
Gravitational force of attraction between sun and planet provides centripetal force for the orbit of planet.
. . . .(I)
Time period of the planet is given by
(using eqn. (i))
. . . . (ii)
According to question
. . . .(iii)