Answer:
g=6
p=9
add the equations to solve for the first variable, plug the variable into the equations to solve for the remaining variables