How do we determine the number of each type of ticket sold?

SOLUTION:
Step 1:
In this question, we are given the following:
Step 2:
The details of the solution are as follows:
Let the number of advance tickets sold be p and
Let the number of same-day tickets sold be q, such that:
[tex]\begin{gathered} 20\text{ p + 40 q = 1400 -- equation 1} \\ p\text{ + q = 45 ----- equation 2} \end{gathered}[/tex][tex]equation\text{ 2 x 20 = 20 p + 20 q = 900 -- equation 3}[/tex][tex]\begin{gathered} equation\text{ 1 minus equation 3, we have that:} \\ 40\text{ q - 20 q = 1400 - 900} \\ 20\text{ q = 500} \\ Divide\text{ both sides by 20, we have that:} \\ q\text{ =}\frac{500}{20}=\text{ 25} \\ q\text{ = 25} \\ since\text{ q = 25, put the value of q in equation 1:} \\ p\text{ + q = 45} \\ p\text{ + 25 = 45} \\ p\text{ = 45 - 25} \\ p\text{ = 20} \\ \end{gathered}[/tex]CONCLUSION:
The number of advance tickets sold = 20
The number of same-day tickets sold = 25