How do chapters 2 and 7 relate to each other?
There are a couple of answers to this question. The first thing that stands out is that their first "pig hunt" occurs in chapter 2. This is the first time that we see Jack's vicious personality. He slams his knife into a tree, promising that next time he'll get the pig. In chapter 7, the boys (lead by Jack) circle up around Robert and jab their spears at him as if he's the pig. This is a very disturbing scene as well. We see that same desire that Jack had in Ralph now.
"Ralph too was fighting to get near, to get a handful of that brown, vulnerable flesh. The desire to sqeeze and hurt was over-mastering."
Another important point is the talk of the beast and then coming face to face with it. In chapter 2, the little boy with the birthmark asks about the "beastie" that he sees at night. He wants to know what they're going to do about it. He is the first to introduce fear into the group of boys.
Then in chapter 7, Jack and Ralph come face to face with the dead parachutist. The beast that they've been talking about all along is right in front of them and they run from it. They truly were scared, as the scene is described as
"presently the mountain was deserted, save for the three abandoned sticks and the thing that bowed."
So the beast and the boys lust for blood and violence are introduced in chapter 2, but they are developed almost completely by the end of chapter 7.