Answer:
x = 48 and y = 104
Step-by-step explanation:
Given equations are:

From equation 1:

Putting the value of y in equation 2

Now we have to put the value of y in one of the equation to find the value of x
Putting y = 104 in the first equation

Hence,
The solution of the system of equations is x = 48 and y = 104
The value of variable which was assumed for number of hats, is the total number of hats.
Since we need to find the number of ways they could enter first, second and third place, (I can't demonstrate, but you should get the idea) take 8, 7 and 6 and multiply them, 5-1 we don't need, we just need 8, 7, and 6, multiply those three numbers and you get 336, there you go, 336 ways to organize all 8 girls in first, second and third place, hope this helps