In: Economics
a) If a firm is making a profit in the market then more and more firms will enter the market and increase the supply reducing the price and profit in the market, similarly, if there are losses in the market then firms will leave the market and increase the price and profit of the existing firms in the market. that is why in the long run there is no profit or loss in a perfectly cojmpetitive firm.
b) Marginal cost of the firms in the market is also the supply curve, when the MC curve passes the AVC curve then the firm will supply as much goods as the marginal cost is, at the point where the demand curve i.e. the price and supply curve meets that is the point where the firms supply their goods.