Final answer:
In a perfectly competitive market, a firm's optimal quantity can be determined by setting the marginal cost equal to the market price. In this case, the optimal quantity (q*) is 5 units.
Step-by-step explanation:
A perfectly competitive firm is a price taker and can sell any quantity at the market-determined price. To determine the optimal quantity, we calculate the firm's marginal cost, which is the cost per additional unit sold. In this case, the marginal cost equation is given by MC = 2 + 4q. To find the optimal quantity (q*), we set marginal cost equal to the market price of $22 and solve for q. By substituting the values, we get: 2 + 4q* = 22. Solving for q*, we find q* = 5 units.