Adult tickets for the school play cost $5 and student tickets cost $3. Thirty more student tickets were sold than adult tickets. If $1794 was collected, how many of each type of ticket was sold?

s = 30 + a

1794 = 3 s + 5 a
so
1794 = 3 (30+a) + 5 a
1794 = 90 + 8 a
8 a = 1704
a = 213
s = 30 + 213 = 243