Let the number of cakes beand the number of pies be.
As per the conditions the system of equations thus formed will be:
… (1)
… (2)
Multiply equation (1) by 8.
Note that both the equations (2) and (3) havelocalid="1647579462957" in same sign, therefore, variablelocalid="1647579475744" can be eliminated if both equations are subtracted.