Let x be the charge before taxes of the first city and y the charge before taxes of the second city. We will translate each of the given facts about this two quantities into equations that will help us to find the values of x and y.
The first given fact is "The hotel charge before tax in the second city was 1500 higher than in the first one". This means that if we add 1500 to the charge of the first city, we would get the second city's charge. This leads to the equation

We are given the tax rate of each city and that the total amount paid of hotel tax was 665. This means that if we calculate the tax amount for each city and then add this quantities, we should get 665.
Since the tax rate of the first city is 7% (or 7/100) we can calculate the tax of the first city by multiplying x and 7/100. So the tax of the first city would be

as the tax rate of the second city is 4%, following the same procedure we have that the tax amount of the second city is

Then, adding this amounts together, we get

If we multiply each side by 100, we get

Using the first equation to replace the value of y in terms of x, we get

If we operate on the left side, we get

So we have the equation

Now, we subtract 6000 from both sides, so we get

Finally, we divide by 11 on both sides, so we get

Now, we replace this value in the first equation, so we have

So the charge before tax in the first city was 5500 and 7000 in the second one.