To begin you would want to set up two equations, setting x as your number of children and y as your number of adults.
x + y = 287
3.50x + 6.80y = 1582
From here, you would solve using substitution.
First, solve for x in the second equation ----> x = 287 - y
Then, substitute this in for x into the first equation ----> 3.50(287-y) + 6.80y = 1582
This leaves us with one variable in the equation, which we can now easily solve for!
1004.50 - 3.50y + 6.80y = 1582
Combine like terms and thus, y = 175
Then use the solved value of y and plug it into the original equation to find x.
x + y = 287 ---> so x + 175 = 287
x = 112
Don't forget to plug your answers back into the original equation to check if they are correct.
3.50(112) + 6.80(175) = 1582
Looks like it works! Hope this helps!