There's often a correlation between tight hamstrings and weak hip flexors. In fact usually it is tight and weak hip flexors and the hamstrings are actually just fine, but because the hip flexors are tight, and because the primary hip flexors actually attach at the base of the spine, they pull the pelvis forward, which means that the hamstrings are constantly in a stretched position - even at rest.
For someone in this situation, I usually recommend stretching the hip flexors with a hip flexor lunge stretch, and then strengthening the hip flexors using a seated psoas (hip flexor) activation exercise. There are many other exercises you can then progress to for the hip flexor. It's usually also a good idea to work on the glute medius as glute medius is almost always weak in this situation as well.hip flexor lunge stretch:
"Position yourself in a half-kneeling position with the right foot forward, and left lower-leg on the floor behind you. Lightly squeeze your left glute, raise your left hand and lean your left hip forward, keeping the spine in a neutral position. You should feel a stretch in your left hip flexor. To enhance the stretch, rotate your torso slightly to the left. Hold this position for the prescribed time and then switch sides."Seated psoas activation:
"Sit on the edge of a chair with torso upright and with the hips and knees bent at 90 degrees. Use your ams to lift your right knee up toward your chest. Activate your psoas as you let go with your arms so that the right leg is suspended as high as possible. Make sure you do not lean back while you are doing this! Hold for the desired time and then slowly lower the leg to the starting position. Repeat with the other side.
Once you are able to complete the desired holds and reps, add a push at the top: when you release your leg, push down on the top of the knee with the opposite hand. As you do this, resist with your right leg - try to hold it up against resistance. Hold for the desired time and then slowly lower the leg. " (the picture shown is the progressed version)