Not too long ago my neighbor cleaned the carburetor on my lawn mower, and I fixed his router config in exchange. He would have had to spend tons of time figuring out how to do it himself, but it took me 5 minutes. I could have cleaned my own carburetor, but he already had the cleaner and had freshly done one, so it took him 5 minutes but would have taken me 30 minutes plus a trip to the store. The same principles from the example are at play here.
And whether Person B can get enough protein from coconuts is entirely irrelevant. All that matters in this scenario is that Person B was concerned about it and wanted to trade.