What was Knowles purpose in writing A Separate Peace?
This question is very broad - to what extent is it possible to understand all the many different motivations as to why an author chooses to write a book? However, certainly one of the major reasons Knowles chose to write this book was to explore the rivalry that can lie at the heart of so many friendships and can potentially destroy it.
Key to understanding how the theme of rivalry is explored is that the story is told using first person narration, and therefore we see everything from Gene's point of view. It is he who assumes there is a massive rivalry between him and Finny, but as he discovers, it only comes from him, and not from Finny at all. Confronting this truth and the envy within himself is what prompts him to knock Finny off the tree. If you want some examples though, you don't need to go very far into the book. Consider this example from the first Chapter, once the older Gene in his flashback returns to when he was at Devon:
The tree was tremendous, an irate, steely black steeple beside the river. I was damned if I'd climb it. The hell with it. No one but Phineas could think up such a crazy idea.
He of course saw nothing the slightest bit intimidating about it. He wouldn't, or wouldn't admit it if he did. Not Phineas.
Note here how the attitudes of Finny and Gene are compared. Gene, naturally more cautious and safety-aware, sees the tree and personifies it with the emotion "irate" (obviously adding to the danger element) and then uses a metaphor to compare it to a black metal steeple. He reflects his determination not to climb it very strongly and seems to disparage Finny for thinking up this crazy idea. However, from Gene's perspective, Finny is completely unphased by this. Note the use of "of course" to reinforce this impression. Also note the doubt that Gene instills about his friend with the inclusion of "wouldn't admit it if he did." The final two words, "Not Phineas", seems to round off Gene's assessment of Finny as a fun loving, danger seeking character who always appears to be fine with situations even if he has to hide his fear within him. Such dialogue and narration highlights the differences between them and the envy that Gene feels at those differences.
Of course, at the end of the story, Gene comes to the tragic realisation that he, like everyone else in the story except for Finny, "constructed at infinite cost to themselves these Maginot Lines against the enemy they thought they saw across the frontier", only to find that there was no enemy at all.