If Robinson and Friday get along they can start mutual exchanges. For example, Robinson can offer bananas in exchange of Friday’s oranges or work in repairing Robinson’s house. This mutually agreed upon exchange is called barter. It can be studied by catallactics that studies the formation of exchange ratios. These are determined by the law of supply and demand.
Barter allows the development of division of labor. Both Robinson and Friday can specialize in what they are best at and both benefit from increased production. The Ricardian law of association shows that even if Robinson is better in everything than Friday both still benefit because Robinson can more easily concentrate on where his relative skills are the best. Barter makes peace profitable for both Robinson and Friday.