Use product as parameter for the import mappings. So create or retrieve first the right product. Then do both the import mappings and make sure you return the updated product. Then do the calculation and store it.
If you don’t need to keep all the data from both REST calls, another approach could be to have a them return non persistent entities. After both REST calls have been made, you can then create an instance of the persistent entity, and place the results of your calculations there.