For total ticket equation use the given: X+Y=40 then, for second equation on prices 2X+3Y=88
So the equations are:
X+Y=40 and 2X+3Y=88
To solve:
take first equation and place x by itself X=(40-Y) then take the equation and place them together:
2(40-Y)+3Y=88 then Foil;
(80-2Y)+3Y=88 Now combine like terms;
3Y-2Y=88-80 ---> Y=8 after place Y=8 in first equation;
X+Y=40 ---> X+8=40 ---> X=32
So the answers are: X=32 and Y=8
A little more than you asked but hope this helps :)