Explanation
The Mayor is a long serving civil-servant in charge of one of the provinces of St. Petersburg and he is the husband of Anna. They both have a daughter called Marya.
The Mayor is never satisfied with whatever he has but wants more. Anna is like the husband because she is not satisfied with her husband alone and flirts openly with Hiestakov, the so-called Government Inspector. The Mayor never discharges his duties as expected of an honest civil servant and Anna also does not discharge her duties as a faithful wife in the home.
The Mayor lacks scruples. He suggests to the other civil servants that the Inspector's visit notwithstanding, they should maintain the status quo i.e. the collection of bribes should continue as usual. Anna also lacks scruples; she competes with her daughter for Hlestakov.
They are both ambitious. As the husband is dreaming of becoming a General, Anna is dreaming of living in the city. Anna is very inquisitive and asks Hlestakov a lot of questions about city people.
The Mayor becomes flustered at the news of the visit of the government inspector. Anna, on the other hand, is calm even when she knows her husand is aware of her flirtation with the Government Inspector. He is selfish. He indulges in self-praise and praises himself to Hlestakov without being aware of it. As an opportunist, he encourages Hiestakov to flirt with his wife because he sees it as an opportunity to be promoted to the rank of General.