Kepler's third law is that the square of the time period of a planet's orbit is proportional to the cube of the orbital radius, i.e.
Kepler lived before Newton and therefore made his findings before Newton. Kepler observed the relationship above but could not explain the reason for it.
Kepler and Newton knew that planetary orbits were elliptical but very nearly circular. So the centripetal force equation can be used (it is accurate enough).
Newton saw that the gravitational force provided the centripetal force for the planetary orbits. The law of gravitation:
For uniform circular motion:
As you can see all terms inside the brackets are constants. Therefore