Don't worry that your sock is inside out; that happens to many people who knit circularly; if you continue to follow the pattern the sock will come out fine, and you will just need to flip it rightside in when you are done (see the thread about that here, if you'd like:
http://www.knittinghelp.com/knitting...472&highlight=).
With picking up stitches you need to start where the yarn is because you need the yarn to wrap around. So you usually start going up the heel flap towards the cuff on the side where the yarn currently is. Then you will knit the stitches which are already on the needle, which will bring you to the other side of the flap. Then you can pick up the stitches on the other side of the flap. I hope this makes sense to you!
Check out the video on working the heel of a sock in the advanced techniques section of the website as well as the picking up stitches in the basic technqiues section. Watching somebody do what you're trying to do will be helpful.
Also, this site may be helpful to you:
http://www.cometosilver.com/socks/SockClass_Gusset.htm
Good luck!
Rebecca