The profit maximising output is where Marginal costs = Marginal revenue. From that you can find the difference between the price and the point where the two lines cross on the graph. You can then multiply your answer by the output giving you thier profit.

To put it simply the answer should be (26 - 12) * 350