We had an electrician move an outlet from one location to another, and he left a big outlet-shaped hole in our drywall. The hole is 2.75" wide and 4.5" high. When I looked inside, I noticed these two wires in there that seem like they're exposed (pic below). Are these dangerous? Should I do something about them?
Those wires that fed the old receptacle were likely disconnected in the junction box on the other end of the piece of cable you see. The electrician may have even cut the other end back so that he was able to push it out of the junction box completely, so you may not even be able to see the other end. It's pretty hard to take the old wire out, it should be stapled in place, including 6" up the wall above that hole.
Some could argue it would have been better form to trim that wire further out of sight, but the upside is you can see the electrician didn't feed the new location by hiding an illegal flying splice without a junction box at the old outlet location.
A non-contact tester might help confirm if it has been disconnected, but you might get a false positive if the other end was just disconnected and insulated but us still in the junction box near hot conductors, so a voltmeter might be needed if you get indefinite results.