When installing new stud in existing frame, does the stud have to be the *exact* height of the inside of the frame?
For the sistered stud, it makes no difference. All the load is transfered to the adjacent stud and there won't be any movement if you use enough screws and the adjacent stud is properly installed.

For the other side, just make sure the stud is resting firmly against the base plate and screw it down, leaving any slack between the stud and top plate. If there's too much movement, either cut a new stud or put a shim up there. But since none of this is load bearing (in terms of the structure, not your drywall), there's no need for the cuts to be perfect. Just make sure that once installed and screwed in, there isn't any play in the stud, and you'll be fine.