Scenario 1:
Yes, this is correct. It is 18 points total.
Scenario 2:
The Mayor is worth 3 followers (3 pennants in the city). This is his strength. Each pennant is worth the same as 1 follower to the Mayor, so in this case another player will need three followers in that city to share in it (and four followers to overrule the Mayors strength). The total is indeed 18, but it is scored in this way: for the 6 tiles, 2 points each (6*2). For the 3 pennants, 2 points each (3*2). The scoring is the same for the Mayor as it is if you had majority followers in the city. So to answer to your final question is yes, it is scored the same way as scenario 1.
Of course, if one of the tiles happens to be the cathedral, then each tile would be worth 3 points (6*3) and each pennant worth 3 points (3*3) for a total of 27 points, but you would still score in the same way as you would score for normal followers.
Another example is if you have placed a Mayor in a city which later gets closed off, leaving
only the Mayor and
no other followers in that city, but the city has
no pennants within its walls, then the Mayor scores nothing as it has no strength within that city. A Mayor
always needs at least one pennant to have some strength.
Hope this helps