With forty workers the United States can make 10,000 pairs of shoes or 40,000 refrigerators; Mexico can make 8,000 pairs or 10,000 refrigerators. The United States is better at both. What matters is the ratio: it is four times better at refrigerators but only a quarter better at shoes, so refrigerators are its comparative advantage and shoes are Mexico's.
Both countries start at point A. The sliders move workers toward each country's comparative advantage, and the panel keeps the combined output of both goods. Shifting the right way raises both totals at once, which is the whole of Ricardo's argument. Point B is what each country then consumes after the book's example trade, 4,000 refrigerators sent to Mexico in exchange for 1,800 pairs of shoes, and it lies beyond the frontier for both.