In a pen the farmer counts 20 pigs and geese for a total of 70 legs. How many animals are there for each kind?

p + g = 20

4p + 2g = 70

solve the system using substitution or elimination