There are no constants here. But we have x and y here. We will create an equation which is: 2y+3x=54. But we will also create a second equation which states the number of seats. x+y=24.
Now we do the two-equation solving method. 2y+3x=54 -2(x+y=24)
2y+3x=54 -2x-2y=-48
x=6
To solve for y, plug in x into one of the original equations. Which one doesn't matter.