How can I get a wire that is outside a wall to be inside a wall
You will need to remove that portion of the drywall, which shouldn't be that big of a deal anyway because you will need to do drywall repair for the two holes as it is.


Turn off power to that circuit!  If you are unsure which circuit this wire belongs to then shut off the main power just to be safe.  You don't want to risk injury by accidentally cutting that wire or possibly other wires that you can't see.
Determine to the best of your ability if the perpendicular wall is load bearing.  If you have any suspicions at all then stop, you are done.  You won't want to do the drilling steps described below on a load-bearing wall. It would be best for you to disconnect this wire and re-run it.
Locate the closest outlet or junction box that this wire goes to on any side.  Test it to make sure there is no power.  Temporarily disconnect the outlet from the wire(s) and if there are any clamps on the wire in the box then temporarily loosen or remove them if possible.  If it is a newer style box with Romex-style wire clamps on the outside, this may not be possible, so you should stop.  The wire is clamped and possibly also stapled into studs or joists.  You won't be able to pull it out from the hole in your picture.  I would deactivate and rerun the line at this point.
If the clamp in the outlet box is loose then have a buddy look at the wire in the picture and see if it moves when you pull and shake on it.  If so then that means it was a crappy DIY job and he didn't staple the wire down like he was supposed to.  This is good because it means that you can pull it out and rerun it through a different hole.  Not yet however.  If the wire doesn't move at all then that means there is another outlet or junction box before this or that the wire is stapled down, meaning you will never be able to rerun this without tearing down obscene amounts of drywall.
Locate the studs.  If you have a fancy pants stud finder then use it to locate and mark the positions of the studs on the facing wall and also possibly the perpendicular wall.  If you do not have such a tool then use a strong magnet to find where the nails are, this is where the studs will be.
Drill a small hole halfway around the center of the stud at the top left of the rectangle you will cut out.  This will allow you to fit a keyhole or drywall saw into to start cutting.
After cutting out that rectangle the perpendicular wall will be exposed.  Inspect the path of the wire and see if can it be easily pushed through back to the outlet.  If so then tape up the end of the wire at the box and tie off a thick fishing line or strong twine to the end of it.  When you pull the wire, it will take the fishing line with it, giving you something on the other end of the outlet that you can pull on to help direct it through holes and other paths.  If the path is long or there are some crazy bends or very small tight stud holes that you can see then this may not work very well.  At that point the wire should be disconnected and a new line should be rerun.
Drill a hole through the necessary studs so the wire will run properly behind the drywall.  Disconnect the fishing line and run it through the new holes, then re-attach the fishing line to the wire.
On the outlet end start pulling gently and slowly while a buddy helps feed you wire from the other end.  The fishing line will help properly navigate the wire back to the outlet box.  If you get hopelessly stuck and don't mind cutting more drywall to see what you are getting snagged on, then proceed, otherwise call it a loss and disconnect the wire.
The wire is back at its home!  Reconnect everything back in the outlet or junction box as it was.  Turn the power back on.  If nothing tripped then you have no shorts.  Test all affected outlets, and switches on that circuit to make sure they all still work properly.
Cut out a rectangle of drywall that fits mostly inside what was cut out. screw it into place, tape and mud the edges two or three times using progressively larger mud knives until everything is smooth.  Leave for a day or two to cure then primer and paint.  You are done.