Changing a value from one list to another

Hello everyone!
I have a list Data1 (name, number) and I have a list Data2 (name). The names are the same in both lists.
For Data2 I have a state “selected list” and I show all selected names in popup in RepeatingGroup + I am added there input for new numbers.

I want to enter new numbers ​​in inputs and when I click on “add” button, these numbers ​​were summed up with the numbers in Data1 by name.
How can I do this?

Could you be more specific with your data types? Are these all custom states?

data types:
Data1
Fields “number”(number), “name”(text)
Data2
Field “name”(text)
The “name” values are the same in both data

For RepeatingGroup with current names from Data2 has a state “selected list”. If checkbox true, then the selected names are shown in the popup in RepeatingGroup Selected Names whith inputs.

I haven’t used other states yet, I’m still learning. This is a new and empty project