I admire your desire to do this. The GOOD news is that if you 'clean' the opening of the doorway where you can see the studs, then your in position for a good start. After that, even as you 'hang' the door, you'll know if it's 'working' properly BEFORE you put the trim back on, and all.
So, see this How To Install A PRE-hung Door for some info. Also, I'd ctc. the mfgr. of the door to see if they have some info. Heck, contact almost ANY mfgr. of a pre-hung door for instructions. Once the door is shimmed and temporarily in place, you can nail the Jam more permanently. I'd pre-drill any nail holes because, otherwise, you may split the wood. The nail holes should be slightly smaller than the diameter of the nails. (Screws are even better. You don't have to pre-drill the studs but you can if you want.)