# Does comparative advantage maximize revenue?

I am reading Lovell's "Economics with calculus", where in Chapter 2, he presents Ricardo's Theory of Comparative Advantage, and states how in a simple model two countries benefit from free trade.

He shows that free trade between two countries $$1$$ and $$2$$ producing two commodities $$A$$ and $$B$$ equalizes the relative price ratios in those countries via arbitrage, i.e., $$\frac{p^1_A}{p^1_B}=\frac{p^2_A}{p^2_B}=\frac{p_A}{p_B}$$ . When that happens and goods are produced at maximum revenue in each country (with the marginal rate of transformation $$-\frac{dB}{dA}$$ in both countries equal to $$\frac{p_A}{p_B}$$), he then proves that the total production of both goods is maximized, and the allocation of resources is efficient.

My question is whether, although both countries are jointly producing the most total product, the actual revenue $$R$$ from this production is also maximized. That is, for country $$1$$, both $$A_1$$ and $$B_1$$ are a function of $$\frac{p_A}{p_B}$$, and each producer in country $$1$$ obtains $$R^1 = p^1_B B_1\left(\frac{p_A}{p_B}\right)+p^1_A A_1\left(\frac{p_A}{p_B}\right)$$ So could there be another price ratio that maximizes revenue for country $$1$$? Does that always come at a cost for country $$2$$?