Generally speaking, backpain and loose motions are not related. Her back pain does not seem to be related to the loose motions because the back pain started a long time back whereas the loose motions have clearly started after eating something recently.
Where exactly is her pain? Mid-back or lower back? Is the pain in the centre or is it more towards one side?
These questions will help to understand her problem better. If she is your age, generally, improper posture, prolonged sitting and wrong ways of bending forward cause backache. Unless these issues are not corrected, the back pain won't go away. Just tablets won't work.
Next Steps
Please see an Orthopaedic surgeon.