Pull the two pieces of the door frame apart by hand. Press the half with the door and hinges into the rough opening of the framed wall section.
Shove wood shims into the gap between the door frame and wall by hand until the door frame is stable and doesn't shift when pushed firmly from the side. Wood shims are slivers of wood used to fill gaps. They stabilize two pieces of adjacent wood. Check for level by placing the level atop the door frame and along the sides. Add or subtract shims as necessary until the door is level.
Using a hammer or a nail gun, nail through the door frame and into the wall framing with 6d finish nails. Cut off the ends of the shims with a utility knife so that they are flush with the door frame.
Press the other half of the door frame into the rough opening from the other side of the wall. The frame will fit into the groove on the other half of the frame. Nail through both halves of the frame with 6d framing nails to connect the two sides of the door frame to each other and to the wall. Nail the casing on both pieces of the door to the wall with 4d framing nails.