In the diagram above, RTX and STY are the marginal cost and the average cost…