Step-by-step answer:
The steps are much easier to follow when we know how many product it sells. The number does not really matter, because we need the profit per item.
Say, the company made and sold 100 items of the product.
The revenue = 100*5 = $500.
On the average, 2 out of 100 are defective and need to be replaced at a cost of $100 each, so
replacement cost = 2* 100 = 200
So net profit for 100 items = $500 -$200 = $300
Net profit for each item = $300/100 = $3.00
Remark: since the product is replaced, no refund is necessary, so revenue stays at $300.