A firm has two factories for which costs are given by:Factory #1: C1 Q1 ( ) = 10Q1 2Factory # 2: C2 Q2 ( ) = 20Q2The firm faces the following demand curve:P = 700 â 5Qwhere Q is total output â i.e., Q = Q1 + Q2a. On a diagram, draw the marginal cost curves for the two factories, the average and marginal revenue curves, and the total marginal cost curve (i.e., the marginal cost of producing Q = Q1 + Q2). Indicate the profit-maximizing output for each factory, total output, and price.b. Calculate the values of Q1, Q2, Q, and P that maximize profit.