Heat capacity of lava per degree Celsius per unit of mass
Multiplied by temperature differential vs ambient, multiplied by mass = total extra heat energy
Then you calculate the sum of heat capacity multiplied by mass for lava and for water, and calculate from that how many degrees above ambient the two masses will land at when combined as the extra energy above is divided over both (assuming water starts at ambient temp)
It won’t be exact because heat capacity varies in materials as temperature changes, both steam and solidification of lava (state change) will contribute significantly, but it’s a decent first estimate
How geologists collect lava (i.imgur.com)