How do you replace a hole in the drywall?
First you start by locating the nearest wooden studs and cut a square, larger than the hole and exposing up to one inch of each wooden stud.  Each wooden stud is typically sixteen inches apart - center to center.  And each wooden stud is typically two inches in width.  Second step is to carefully measure the open space after you've cut the square.  Take your time and measure as close to the existing drywall as possible.  Take 4 measurements of 2 in length and 2 in width to ensure accuracy.  Cut that square from your replacement drywall.  Shave sides with sandpaper for tight fit.  Once your replacement square fits, insert drywall screws into the sides of the drywall that will also go through the previously exposed wooden studs.  Once the new square is secure, you can layer ontop the drywall paste to let dry.  Sand the drywall paste over the seams of the square, and repeat as necessary until you have a uniform, smooth surface.  Apply paint over the entire workspace and let dry.