How do I fix a loose door frame?
The loose base is causing catching at the opposite corner because the entire door and frame is pivoting around the upper hinge and nearby framing that is presumably still attached firmly to the jack stud behind the frame.  As the bottom left part of the frame swings out, the upper right of the door is moving up to where it hits against the frame there.
Take a look at the loose part of the frame and see if the nails attaching it to the jack stud have pulled loose.  The hinge side of the door frame is often attached directly to the jack studs (no shims) so securing it may simply be a matter of driving in some brads or finish nails nearby.

If there were shims behind the frame, they may not be where they were originally; then you'd probably have to remove the door trim to get some more installed in the gap, then drive nails through the door frame, shims and studs.