Due to the fact items arriving from seprate are always separate messages, you need to combine the items of interest into one message so that you can access them both at the same time.
Luckily this is pretty simple - see this article in the cookbook for an example of how to join messages into one object.
Once you have both values in a single message, your calculation is pretty simple.
Use debug nodes to understand what is happening in your flows