Webmath.com has an on-line calculator for solving linear equations
It gives you the answers and all the steps to solve
One idea is just get an approximate range for the solutions or an estimate
Coach is about $100, Sleeper about $300
Total receipts are about $20,000
The total passengers are 90 or about 100
If half were Coach and half Sleeper
you'd have receipts of $5,000 + $1500, but 90 is less than 100 so you'd get less than the $20,000 in receipts. So to increase the receipts you need more Sleeper tickets and less Coach.
After doing the algebra, you get 39 Coach and 51 Sleeper
The system of equations to algebraically solve is 2 equations, 2 unknowns.
C=coach tickets S=sleeper tickets
C+S=90 and 2nd equation 117C+294S=19,557
You can solve for one of the variables, take your pick either one first. Try S first
C=90-S then substitute into the 2nd equation 117(90-S)+294S=19557
Solve for S
10530-117S+294S=19557
177S = 9027
S = 9027/177 = 51
C=90-S=90-51=39
Or we could have solved for C first
117C+294(90-C)=19557
117C + 26460-294C=19557
294C-117C=26460-19557
177C=6903
C=6903/177=39
Check the answer 117(39)+294(51)= 4563+14994=19557
Or you could use linear or matrix algebra to solve the two linearly independent equations, with row operations
Or graph the two lines corresponding to the 2 equations and find where they intersect
C+S=90 is a straight line connecting 90 on the horizontal axis to 90 on the vertical axis, the points (0,90) and (90,0) The line has slope = -1. It goes downward at negative 45 degrees.
The other equation is graphically a straight line connecting about (0,67) to (167,0), This line is much flatter
They intersect at the point (39,51) With some graph paper you might get very close to that.
But doing the basic algebra and checking the answer is probably all you need. But it's nice to know you're in the right range for the answers, or get the same answer doing it with different methods.
Scientific calculators can solve systems of linear equations, and graph them as well.
Yasmina H.
Thank you Jesse. I appreciate your help and how well you explained it.08/07/19