In chapter 8 of Harper Lee's To Kill a Mockingbird, Jem is the first one to come to the conclusion that Boo Radley is the one behind the gifts they find in the tree's knothole. This information does not come easy, though, because Jem takes some time to examine the types of gifts that are received; then, he compares them to the strange goings-on around the Radleys' home. For example, on the night that Jem sneaks up to the back porch of the Radleys' house, he loses his pants on the fence when he runs away. When Jem goes back to fetch his pants later that night, he finds them crudely mended, folded up, and waiting for him--as though a friend helps him to avoid punishment for sneaking around that night.
Next, as gifts show up in the knothole of the tree, Jem takes them to Atticus for help to examine their origins and purpose. This helps him to determine that only a kind-hearted person would share spelling medals from school, a broken pocket watch, and carved soap dolls with neighborhood children--not a boogeyman that some people like Stephanie Crawford would have the town believe.
Finally, on the night of the Miss Maudie's house fire, Scout receives a blanket from someone who cannot be accounted for among the neighbors helping with the fire. As a result, Jem decides that Boo Radley is the generous benefactor of the blanket and the gifts in the tree as follows:
"Jem seemed to have lost his mind. He began pouring out our secrets right and left in total disregard for my safety if not for his own, omitting nothing, knothole, pants and all. . . 'Mr. Nathan put cement in that tree, Atticus, an' he did it to stop us findin' things--he's crazy, I reckon, like they say, but Atticus, I swear to God he ain't ever harmed us, he [Boo] ain't ever hurt us, he coulda cut my throat from ear to ear that night but he tried to mend my pants instead . . . he ain't ever hurt us, Atticus--" (72).
The above passage shows that Jem believes that Boo is a kind and generous person trying to communicate with the children through the knothole by giving them gifts. Mr. Nathan Radley, on the other hand, is the one who stops it because "he's crazy." As a result of Jem's outburst of information to Atticus in chapter 8, Scout learns that Boo is the benefactor behind the gifts in the tree as well.