Solve for a P=a+3b+4c