Cut Out the Patch
If the damaged area came out in one piece like the one shown in the image, use that section as a template when cutting a patch. Be sure to match the tapered area of the new piece with that of the old one.
Otherwise, measure each side of the opening as well as the sizes and positions of any electrical boxes, door frames, or window frames within it. Transfer the measurements to a panel of the same type and thickness as the damaged drywall, using a carpenter's square to ensure 90-degree corners. Don't use the panel's tapered edges for the patch's edges unless an edge of the opening falls at an inside corner.
Cut out the patch, positioning the saw blade on the outline's inner edge; for an opening within the patch, cut just outside the line.