Economic profit is the difference between total revenue and total cost. Producer surplus is the difference between total revenue and total variable cost or total revenue and marginal cost. Thus, the difference between profit and PS is the fixed cost of production.
The above distinction creates a problem when the ATC is not equal to the MC. Normally when you are given these problems they will simplify the problem by mentioning the ATC =MC or they will leave ATC out of the curve completely.