Therefore, in the practice of Dhamma, even if one specifically looks to the benefit of other beings, the results that are most assured are those that arise within oneself. Thus it is said that by helping oneself one helps others, and by helping others one helps oneself.
There is an analogy regarding this related by the Buddha in the story of the two acrobats. One form of acrobatics performed in the Buddha's time involved the use of a long bamboo pole, which was balanced on the head and shoulders of one acrobat, while another acrobat balanced himself on top of the pole. They would perform various tricks and balancing acts in this way. Two of these acrobats, master and apprentice, were traveling around the country performing their art.
One day the master said, "Now you keep your eye on me, and I'll keep my eye on you and so keep you from falling off."
The apprentice replied, "Oh, no, master. You should look after yourself while I look after myself. In this way we can perform our act and earn a living in safety."
The meaning of the story is: in looking after yourself you also look after others, and by looking after others you also look after yourself. In practicing the Dhamma we are cultivating virtue, which first arises in ourselves. That virtue can then extend to others, even without our knowing about it. Specifically, when practicing Dhamma we are cultivating morality (sīla), concentration (samādhi) and wisdom (paññā). When our moral conduct is pure we don't harm others. This is one result of Dhamma practice. Although we have developed that virtue within ourselves, its good effects extend to others in that we no longer present any danger to them. Again, if we help others, for example by exercising forbearance (khanti), not harming others through anger, but exercising mettā, goodwill, and karunā, compassion, we are practicing Dhamma, the fruit of which also arises within ourselves. Thus it is said that looking after ourselves we look after others, and when looking after others we look after ourselves. The practice of Dhamma is co-productive in that its effects extend to all beings.