It takes Anne 3 hours to make a pie and 4 hours to make a shirt. It takes Mary 2 hours to make a pie and 5 hours to make a shirt.  Anne should specialize in making shirts and Mary should specialize in making pies, and they should trade.