You have to drive out the retaining pin in rear sight post, then unscrew the sight, pushing the rear sight assembly up and out of the carry handle. Once the sight assembly is free of the carry handle, the elevation wheel can slide out to either side. You'll see a small hole inside the assembly, put the spring in with the ball detent after, and carefully reinsert the elevation wheel. Be careful to get it slide into one of the little detent dimples on the elevation wheel, and take your time - if either one of those pieces go sproing, you'll have trouble finding them.
With the detent assembly and elevation wheel inserted into the carry handle, reinsert the rear sight assembly. There's a spring in the middle, don't leave it out. Screw the sight assembly in about one turn of the elevation wheel to hold everything in place. You now need to get lift up the spring so that the roll pin will be inserted underneath and not through it - this can be done with a pin punch or small screwdrivers or paper clips or something. When you've got the spring held up out of the way, install the roll pin, and then continue screwing the sight base down until it bottoms out. Now use a small hex wrench to loosen the adjusting setscrew in the top of the elevation wheel, and move the marked section around so that it's at 8/3 or at most one click below 8/3 when the sight's bottomed out.
You can find the full tech manual procedure for doing this the the old.ar15.com site.