To attach the hinges, the spacing needs to be correct between the bookcases. There are usually quarter inch spacers provided with the kit (image 1), and clamp between the two units (image 2). Make sure the tops are even when they are clamped into position.
Attaching the hinge is important to keep the shelves straight. Start at the top and put a few screws in there, at the bottom and center.
To position the mounting brackets for the bookcase door, the pivot points of the threshold and the valence need to line up. The edge of the door needs to be flush with the trim (image 1). With the valance and threshold in place, make surethey are evenly spaced on both ends (image 2).