To solve this you have to express the quantities of both as a function of one. For example since the number of bouquets sold was 15 more than the number of hearts, you can express the bouquets as X and then the number of hearts as X-15 rather just Y.
Then you have the following equation.
Factor it out to get
Check it's right by plugging these numbers into the formuler 5x+3y=339
So they sold 48 roses and 33 hearts.
You have two equations, let games be x and y be rides
Take the first equation and set x alone on one side of the equation
5x=28.75-6y <- Divide this by 5 to get x
Substitute this for x in the second equation and you get
You'll want to express the number of students in each of the periods as a function of the number of students in a reference period.
Let x be first period, y second periodand z third period
We know what y=2x and z=3x-10
Which you can then rewrite as a function of X
So first semester 28 students, second semester 56 students and third semester 74 students.