A company produces two types of gadgets, A and B. The variable cost to produce gadget A is $3.50 per unit, and the variable cost to produce gadget B is $5.75 per unit. The fixed costs associated with production are $1200. The company has found that it can sell gadget A for $7.50 and gadget B for $11.25. The company estimates that it will produce and sell a total of 400 gadgets for the upcoming quarter.
Let $x$ be the number of gadget A produced and sold, while $y$ be the number of gadget B produced and sold. The total production requirement gives us the equation:
$$x + y = 400$$
Define the total profit $P$ from the sale of gadgets A and B as:
$$P = (7.50x + 11.25y) - (3.50x + 5.75y) - 1200$$
What is the maximum profit that the company can achieve if it produces 400 gadgets?