(a) The pain in her legs could be because of the accumulation of lactic acid in the muscles. During heavy exercise or running, etc., the muscle cells respire anaerobically and produce lactic acid, which is an incomplete breakdown of s carbon 6 molecule called glucose.
(b) The massage gave her relief because it improved the circulation of blood leading to increased supply of oxygen to the muscle cells which helped in complete breakdown of lactic acid into CO2 and water