The total cost each year is calculated by multiplying the number of units by the cost per unit. They are then all added together to get the total cost over the entire life.
So for the production costs, the total is (5,000 x $80) + (10,000 x $40) + (25,000 x $30) + (10,000 x $30) = $1,850,000.
It is the same approach for the customer services.