Newton's derivation of the law of gravity stemmed from the principle that the same gravitational force affecting falling objects on Earth also governs planetary motion. He hypothesized that gravity acts as a centripetal force, with its strength depending on the masses of two objects and inversely on the square of the distance between them. Initially, his theory did not align with the observed motion of the Moon, leading him to set it aside for 20 years until better data validated his predictions. Newton's insights were further informed by Kepler's laws of planetary motion, which he built upon to refine his calculations. Ultimately, his approach exemplified the scientific method through assumptions, hypotheses, and validation.