How to use a sum function to add the values of two fields from different repeating tables into another repeating table.
1. Create an Action Rule (Set a Field Value) for the fields that are to be added together.
2. Set a Field Value to the field in which you want to show the result.
3. Create a formula with similar syntax: $form.getValue('/my:myFields/my:Repeating_Table_2/my:Repeating_Content/my:field_4')+$form.getValue('/my:myFields/my:Repeating_Table_4/my:Repeating_Content/my:field_8')
where field_4 is the first cell you want to be part of the equation and field_8 is the second cell.
4. Create a condition where the field is not blank for the fields that need to be added together (eg: if Field X not blank).
5. Make sure the Properties of the cells to be added and the resulting cell are sent to a number (Integer or Decimal as required).
See the attached solution file for an example.