Mark the rough opening necessary for the planned recessed medicine cabinet. The required opening is often noted in the instructions for the cabinet. Remove the wall material from this area. Use a reciprocating saw to cut through the material.
Cut any wall studs that fall within the necessary cabinet opening. Cut the stud with a reciprocating saw. Remove it carefully to avoid damage to the wall materials on the opposite side of the wall. In some cases damage is unavoidable and will need to be repaired as part of the project.
Place blocks horizontally at the top and bottom of the opening necessary for the recessed cabinet. These blocks are made of 2-by-4-inch lumber and are fastened to the existing studs on each side of the cabinet opening. It would be difficult or impossible to swing a hammer in these close quarters. Fasten the blocks in place using 3-inch deck screws driven by a drill or screw gun. Place two screws on each end of each block.
Place a "cripple" stud between the blocks on the edge of the planned opening for the recessed cabinet. These complete the frame and are fastened to the studs with 3-inch deck screws.
Place the recessed cabinet in the opening. Attach it to the cripple studs and blocks according to the manufacturer's instructions.