Use a tape measure to measure the area around the door (Image 1). Then, use a miter saw to cut the trim to those measurements, factoring in a 1/8" reveal on the doorway (Image 2). Cut the ends at 45-degree angles to fit around the door jamb.
Drill a small pilot hole through the top of the trim (Image 1); sink a screw into the pilot hole. Then, use a finish nail gun to drive a finish nail into the opposite corner (Image 2). Nail the rest of the trim into place (Image 3).