Firstly evaluation is required. If the pain is radiating type and follows a pattern from your back, buttock, back or side of thigh.. the problem could be a possible disc herniation or nerve impingement. But your leg pain and back pain are different, then the pain has more muscular origin.
Next Steps
get properly evaluated before starting any exercises
Health Tips
avoid forward sustained bending, exercises like crunches, flexion exercises till diagnosis is confirmed