Let A and B be the number of advance and same-day tickets sold. From the question we can write the following relations:
From this, we can isolate A in the first relation and substitute it in the second. This way we can find the value of B, as follows:
From this, we can substitute the value of B in the first relation to find A.
From this, we conclude that:
The number of advance tickets sold is 40
The number of same-day tickets sold is 30