Background: James Fenimore Cooper (September 15, 1789 - September 14, 1851) was a prolific and popular American writer of the first half of the 19th century. His historical romances draw a picture of frontier and American Indian life in the early American days which created a unique form of American literature. He lived most of his life in Cooperstown, New York, which was founded by his father William on property that he owned. Cooper was a lifelong member of the Episcopal Church and contributed generously to it.
Context: In 1820, Cooper's wife Susan wagered that he could write a book better than the one that she was reading. In response to the wager, Cooper wrote the novel Precaution (1820). Its focus on morals and manners was influenced by Jane Austen's approach to fiction. He anonymously published Precaution and it received favorable notice from the United States and England. By contrast, his second novel The Spy (1821) was inspired by a tale related to him by neighbor and family friend John Jay. It was more successful and became a bestseller; the setting of this Revolutionary War tale is widely believed to have been John Jay's family home "The Locusts" in Rye, New York. In 1823, Cooper published The Pioneers, the first of the Leatherstocking series. The series features Natty Bumppo, a resourceful American woodsman at home with the Delaware Indians and their chief Chingachgook. Bumppo was also the main character of Cooper's most famous novel The Last of the Mohicans (1826), written in New York City where Cooper and his family lived from 1822 to 1826. The book became one of the most widely read American novels of the 19th century.  In 1823, Cooper was living in New York on Beach Street in what is now downtown's Tribeca. While there, he became a member of the Philadelphia Philosophical Society. In August of that year, his first son died.  In 1824, General Lafayette arrived from France aboard the Cadmus at Castle Garden in New York City as the nation's guest. Cooper witnessed his arrival and was one of the active committee of welcome and entertainment.
Question: What was the diffrence between his first and second book. Whats the answer?
By contrast, his second novel The Spy (1821) was inspired by a tale related to him by neighbor and family friend John Jay.