Filling gaps and holes in dry wall
The first repair is a piece of cake. Get some drywall tape and a bucket of joint compound and tape away. Rather than explain it here, just Google "taping drywall" and you'll get more information than I could ever provide.

The second one is little trickier because you'll have to support a square plug of drywall. You can get drywall clips from your home store just for this purpose. You can also get a strip on wood a few inches longer the hole and screw it into the inside portion of the hole from the outside. Then cut your plug and place it in the hole and secure it to your support with a few drywall screws, the tape like you did to the first one. 

If you think you'll ever have to access the second hole for other electrical work, you can just mount a blank outlet cover over the hole.