Relationship addition

Hello,

I would like to know how to sum up the two elements in the relationship tab and display the result in the "Cost" property of the parent item ?

Thank you !