I'd probably nigger rig it by cutting as little as you can out and cutting pressure treated plywood bigger than your roof hole then cut it little by little until it almost barely doesn't fit and hammer the end of it up into the hole. Then i'd put some waterproof roofing tar around the seams and maybe some thin roof flashing over the entire area before putting shingles on it

Or if you can access it from below do most of the same stuff only use braces on the underside that attaches to the existing roof and the new piece you're patching in and patch it from above with the waterproof tar and flashing