As the ancients said: if you set up a good legal system in the world, the world will be at peace; if you establish a good legal system in a country, a country will be at peace.
The option 'If you are poor, you should take good care of your morality and self-cultivation, and if you are rich, you should strive to benefit the rest of the world' is most similar to the formal structure of the above-mentioned ancients.