Verb
do well by doing good (third-person singular simple present does well by doing good, present participle doing well by doing good, simple past did well by doing good, past participle done well by doing good)
(idiomatic) To achieve social acceptance or financial success as a result of behaving in a benevolent or charitable manner.