First Law of Thermodynamics where U1-2-->Change in internal energy,Q-->heat added,W-->work done
U1-2 = W + Q
W = Q + U1-2
Q = U1-2 + W
Q = U1-2 -W