Let b = number of tickets bought before and d = number bought at the door. Then
b + d = 478 (1)
2b + 3d = 1110 (2)
Double all terms in (1)
2b + 2d = 956 (3)
Subtract (3) from (2) term by term:
3d - 2d = 1110 - 956
d = 154
Put this back into (1):
b + 154 = 478
Subtract 154 from both sides:
b = 324
So there were 324 tickets bought before and 154 at the door.
.