Clear the room and carry in the bookcases. Measure the wall where the bed and bookcases will be positioned. Allow space for the bookcases and full-sized bed. In this example, the room is 124-1/4". After measuring, allow that 13-7/8" be left on the side of each bookcase after being properly positioned.
Find the stud location, and measure from each end of the cut area to the stud's center. Slide the bookcase in place and use a level to make sure it's plumb. Following the same measurements taken for the stud location, secure the cabinet to the stud with 3" wood screws. Repeat the process for second bookcase.
Add decorative molding to the top of the bookcases. To follow this example, measure the top of the bookcase, and transfer the measurement to the trim. Cut the trim with a compound miter saw at 45-degree angles at the corners. Make a cross cut at the end that will be positioned against the wall. Nail it into place using a brad nailer and 1" brads.
Fill the nail holes with wood putty, and sand the entire piece with 220-grit sanding block. Wipe it clean with a clean, dry rag.
Apply a coat of primer and allow it to dry. Then, lightly sand it with the sanding block and wipe it to remove residue.