Maybe today someone will help!! Please:)

There are two firms who collude and behave like one firm but with two plants. MC1=10, MC2=30. Market demand Q=200-P. Two plants maximize profits. What is total profit nad production, price in each plant?
There is also presumption that plant1 can produce max 90 nad plant2 max 30.
I really need help with this exercise.

To solve this exercise, we can follow these steps:

1. Determine the profit-maximizing output level for each plant individually:
- To find the profit-maximizing output level for plant 1, we need to equate its marginal cost (MC1) to the market price (P). In this case, MC1 = 10. Let's call the output level for plant 1 as Q1.
MC1 = 10 = P = 200 - Q1 - Q2 (since Q = Q1 + Q2)
Simplifying the equation, we get: Q1 = 190 - Q2
- Similarly, for plant 2, we'll equate MC2 to P. In this case, MC2 = 30. Let's call the output level for plant 2 as Q2.
MC2 = 30 = P = 200 - Q1 - Q2
Simplifying the equation, we get: Q2 = 170 - Q1

2. Set up the profit function:
- The profit function for a firm is given by: Profit = (P - MC) * Q
Since we have two plants, the total profit (Profit_total) will be the sum of the individual plant profits.

3. Determine the profit-maximizing output levels and price:
- Substituting the equations from step 1 into the profit function, we get:
Profit_total = (P - MC1) * Q1 + (P - MC2) * Q2
Replace P with the market demand equation: P = 200 - Q1 - Q2
Substitute MC1 = 10 and MC2 = 30: Profit_total = (200 - Q1 - Q2 - 10) * Q1 + (200 - Q1 - Q2 - 30) * Q2
Simplify the equation and express it as a quadratic function.

4. Find the maximum profit:
- To find the maximum profit, we can differentiate the profit function with respect to Q1 and Q2, and set the derivatives equal to 0. Solve the resulting equations to find the optimal values of Q1 and Q2.
- Use the second derivative test to ensure that the solution yields a maximum profit.

5. Calculate the price and total profit:
- Once we have the optimal output levels (Q1 and Q2), we can substitute them back into the demand equation (P = 200 - Q1 - Q2) to find the market price (P).
- The total profit can be calculated by substituting the optimal Q1 and Q2 values into the profit function.

Given the constraints that plant 1 can produce a maximum of 90 units and plant 2 can produce a maximum of 30 units, the optimal output levels might be affected. Make sure to include these constraints while calculating the optimal output levels, price, and total profit.