The filtered will return the recordsets that match the criteria (in your case, the order lines that the state isnt "state").
When you use mapped to the recordset, i will return a list with the field_name for each of the recordset, if the field is a many2one, it will remove duplicates.
Example, you have a recordset with a field called "quantity".
record 1: quantity = 5
record 2: quantity = 6
record 3: quantity = 10
after the filtered you may have:
res = sale.order.line(1,2,3,)
when applying mapped:
quantities_list = res.mapped('quantity') #[5, 6, 10]
so the sum will return 21 if they are float/int.
Hope it helps!