x is the number of adult tickets
y is the number of student tickets
We have the next equation for the number of tickets in total
x+y=1240
We have the next equation for the receipts
6x+4y= 6950
We will isolate the x of the first equation
x=1240-y
Then we substitute in the second equation
6(1240-y)+4y= 6950
We simplify
7440-6y+4y=6950
-2y=6950-7440
-2y=-490
y=-490/-2
y=245
Then we use the equation where the x is isolated and we substitute the value of y
x=1240-245=995
ANSWER
They sold
995 adult tickets
245 student tickets