I think the ingredient's you need are f=GmM/r/r Newtons law of gravity and f=ma then you prove the rest simply by definition of small g=a at r=R. You do a few substitutions and you are there. You are probably having problems with the formalism of the process?