What is the difference between rivalry and competition? Which one is shown in the novel?
Rivalry is between two distinct parties.
Competition is between any parties.
In A Separate Peace Gene pits himself in particular as a rival of Finny. He wants to have something that he is better than Finny at, but not necessarily the same thing that Finny excels in, sports.
Finny on the other hand enjoys competition fully with any group and never really sets out on purpose to have a rival. Finny is highly competitive and comments that in sports one must always win. He often creates activities involving competition that pit everyone against each other... but all of this he does with good sportsmanship.
Many wonder if Gene's jealousy and quest to be better drove him to push Finny out of the tree in the first place and so severely injure his friend that Finny could never play sports again. If so, this is true evidence of rivalry.
I would argue both rivalry and competition are shown in the book through these two characters.