2 Mayors in a city...how to score?
If player one has a meeple and a mayor and player two has just a mayor, then player one will win, as player one will have N + 1 strength vs player two's N strength, where N is the number of coat of arms (i.e. pennants) in the city.
From the rules:

The strength of your mayor is equal to the number of coats of arms in the city it occupies. If two or more players have meeples in the same city, it is scored as follows:
●Each normal meeple has 1 strength.
●Each large meeple has 2 strength.
●Each mayor has strength equal to the number of coats of arms in the city. If there are no coats of arms, the mayor has 0 strength.
When scoring a city, each player adds the strength of their meeples in the city. The player with the highest strength scores the points for that city. In case of a tie, all tied players score full points.

Note that &quot;coat of arms&quot; is the 2014 rules term for &quot;pennant&quot;.  See When was &quot;pennant&quot; renamed &quot;coat of arms&quot; in Carcassonne? for more.