Answer:
$510
Explanation:
                     units      cost       total
beginning inventory       8       $10        $80
purchases               40      $12       $480
ending inventory          5
                           FIFO ⇒ $12     $60
                           LIFO ⇒ $10     $50
            average = $560 / 48 ⇒ $11.67   $58.33
under LIFO, the cost of goods sold = ($80 + $480 ) - $50 = $510