When I marked the hole above, I put a finger inside the hole and felt that the stud (vertical wooden beam) was right there, so I marked it so that the stud was exposed half-way when removing the damaged piece. This gives me a place to screw the new pice to on the one side.
Then I measured and cut out a new piece of drywall patch. Perfect fit

Then a cut a piece of wood. Just a strip about an inch wide, and half an inch thick, and about two inches longer than the hole on each side. In this case, the hole was about 4,5 inches high, the wood was about 8 inches long.
Screw the wood to the inside of the wall with a couple of drywall screws. Make sure that the head of the screw pulls just below the level of tghe drywall, but not too deep or it will pull right through and have no strength.
You need at least two of these, unless you have a stud showing. See why I opened up the stud?

Then insert the patch, and screw it to the stud and the piece of wooden support. With such a small patch I only needed two screws.