Each shaded triangle is the gain in total surplus from opening the border. In Brazil the price rises from 12 cents to 16, so growers sell more at a better price and buyers pay more for less. In the United States the price falls from 24 to 16, so buyers gain and growers lose. In both countries the gain outweighs the loss, and the triangle is what is left over.
That is the case for free trade and also the reason it is fought over. The gain is spread thinly across a whole country of buyers or a whole industry's customers, while the loss lands on a small, visible group who know exactly what it has cost them. The slider moves the world price between the two no-trade prices, and the panel reports how much each country ships at that price. Only at 16 cents do exports and imports match.