The numbers are "x" and "y";
Therefore, we can suggest this system of equations:
x+y=24 ⇒x=24-y
x/y=5
solve this problem by substitution method.
(24-y)/y=5
24-y=5y
-y-5y=-24
-6y=-24
y=-24/-6=4
x=24-y
x=24-4
x=20
Answer: the numer are: 20 and 4
The two equations are

and

the first equation can be solved for x to be

next you can substitute x in the second equation

Distribute 4 to everything in the parentheses

combine like terms:

subtract 28 from both sides of the equation

divide both sides by -1.5

plug this in to the original equation of x+y=7

subtract 4 from both sides.

Final Answer: they bought 3 adult tickets and 4 student tickets
Hope this helps!