Some questions on framing a doorway in a hallway
Probably the hackery of just attaching to everything solid would work. (I'd throw a couple of substantial toggle bolts through the stud on the left, through the drywall, just for good measure.)

However, since a portion of the "left" wall is going to be covered up, this gives an opportunity to cut a 4-1/2" wide slit in the drywall and add a couple of studs nailed together into a post without too much trouble. (Well, the 'trouble' is laying it out perfectly, but you'd start from the left and work your way right.) If you were really keen, you'd figure out a way to put some blocking between the old studs and your new post to further solidify it. 

Be particularly choosy when buying lumber for this project. Anything less than almost perfect will make your life harder.