Comparative Advantage and Gains from Trade
Terminology
Absolute advantage: The ability of an individual, firm, or country to produce more of a good or service than competitors using the same amount of resources.
Comparative advantage: The ability of an individual or group to carry out a particular economic activity more efficiently than another individual or group.
Comparative advantage matters more when considering specialization, gains from trade, etc.
Gains from trade: The increase in overall welfare and economic efficiency that results from specialization and the exchange of goods and services between individuals or countries.
To find comparative advantage, you must calculate opportunity cost.
To calculate opportunity cost for an output problem, create a table like this one:

Output problems: Data represents output produced from a fixed amount of input.
To find the opportunity cost of product A, take the data given for product B and divide it by product A.
Input problems: Data represents input required to produce a fixed amount of output. Opportunity cost of product A = product A / Product B
Terms of trade: An agreed upon exchange rate of two goods between two producers
How to Determine if Terms of Trade are Mutually Beneficial?
Do the terms of trade for a particular good/service fall between the opportunity costs of the two producers?
Do the terms of trade result in gains from trade for both economies?
After specialization has been established, will there be consumption beyond the production possibilities curve?