First you have to think about how to convert the CSV to JSON.
If the CSV only contains simple values (without " to protect the values), this is doable with built-in PA functions.
If not, you will need to purchase an action to do this (see "Parse CSV") action.
You can also create your own action, use PA Desktop, or fiddle with Office scripts.
After this is settled, the rest is straight forward:
Create an array of the values in you id column and grab the data records from both JSONs with this id.
You will find an example with 2 different ways to do so here:
https://powerusers.microsoft.com/t5/Building-Flows/Power-Automate-Create-HTML-Table-rows-staggered-against-colums/m-p/2351663#M261769
If you show me the structure of your JSONs, I can help you to do so.