Market Equilibrium and Profit Maximization