I have pain in both legs on the calve and hamstrings I have also got a cramp pain on left side of my ribs what could this be?

Tight hamstrings. Must likely pain is due to tight hamstrings and calf muscle (achilles or gastrosoleus complex)some persons are genetically predispose for tight muscles. Recomendations are very good program of consistent and progressive streching that should be done as a routine on a daily basis and specially before and after running.