Mark the location of the studs on the walls where you wish to install the recessed cabinets using a pencil and stud finder. Hold the cabinets against the portion of the wall where you wish to install them, preferably over one of the wall studs, and trace the outline of the cabinet on the wall.
Cut along the outlines you marked on the wall using a drywall knife. Cut through the wall studs along the cabinet outline using a handsaw and remove the stud from the cutout.
Measure the dimensions of the cutout you made in the wall. Cut wood blocking that is as wide as the cutout is deep and that fits along the perimeter of the cutout, accommodating the wall stud you cut through.
Spread construction adhesive on the sides of the wood blocks and then insert the wood blocks into the cutout. Position the wood blocks under the drywall at the very edge of the cutout. To hold them in place, Drive wood screws through the drywall and into the wood blocks.
Slide the wall cabinets into the cutouts, and then drill pilot holes through the top, bottom and sides of each cabinet and into the wood blocks. Drive wood screws through the pilot holes to anchor the cabinets into the wall cutouts.