Another hint is to use a long screw in one of the holes in the top most hinge long enough to penetrate the stud.
Repair damaged door frame hinge.
If you have a centering hinge drill use the hinge as a template and the finish repair will be better than new and last for years.
To repair a split door frame remove the door strip and molding starting at the bottom of the frame and working your way up.
Then measure 6 inches above and below the frame damage and carefully cut the damaged frame away at the marked measurements.
The screw holes where the hinge or hinges are loose need to be repaired.
To relocate the hinge remove the screws from the hinge and slide it up or down a few inches.
Then you can drive the screws into the screw holes on the hinge to secure it.
You may need to re chisel a pock in the frame so the hinge sits flush.
A simple method of using golf tees to fix holes that have been stripped out and are to big so the screws will not tighten up the hinge to the door or jamb.