60x+40y=800; 3x+2y=40 is the simplest expression of the equation.
So y=(40-3x)/2 has to be solved with integer values for x and y.
This means that x must be an even number and since the integers must be positive, 40-3x>0, so 3x<40 and x<13.
The table below shows all possible values for x and y:
x (first class) |
y (second class) |
2 (120) |
17 (680) |
4 (240) |
14 (560) |
6 (360) |
11 (440) |
8 (480) |
8 (320) |
10 (600) |
5 (200) |
12 (720) |
2 (80) |
We can see from the table that 8 first and 8 second class tickets cost 800 bht. But this is only one example of the combinations of first and second class tickets. The numbers in brackets are the cost of the tickets. The total number of tickets goes from 19 to 14 in steps of 1.