Step 1: If an object is moving in a circular path of radius R with velocity v, some force must be pushing or pulling it towards the center of the circle. How large must that centripetal force be?
Step 2: In the case of a planet (mass m) moving around the Sun (mass M), gravity provides this force. How strong is the force of gravity in this case?
Step 3: Setting these two forces equal to each other gives us a relationship between the square of the velocity v and the radius R.
Step 4: If a planet moves around a circle of radius R with speed v, can you express the velocity in terms of the period P?
Step 5: Take this expression for velocity and square it.
Step 6: Almost there! Just re-arrange things so that all the terms with P go on the left, and all the terms with R to on the right. What do you get?