Let the number of first-class ticket be x.
Number of 2nd class ticket be 18−x.
10x+3(18−x)=110
10x+59−3x=110
7x=56
x=8
There are 8 1st class ticket
and 10 2nd class ticket.
Cost of tickets when the number of first-class tickets and 2nd class are interchanged is
10×10+8×3=100+24
= 124