How were the old heads able to calculate the path or revolution of other planets around the sun?

I would like to know the answer to this particular question. Do you know any book or document that contains the solution to this particular problem?