A theater group made appearances in two countries. The hotel charges before tax in the second country were $500 lower than in the first. The tax on the hotel bill was 5.5% in the first country and 4.5%in the second. After the trip, the total tax paid on accommodation expenses was $477.50 . How much was the hotel bill in the first country before tax?

x(0.055)+(x-500)(0.045)=477.50

.1x=-22.5=477.5
.1x-22.5+22.5=477.5+22.5
.1x=500
.1x/.1=500/.1
x=5000
first hotel was 5000
second hotel is 5000-500=4500