Answer
$Q=-287.38\ Btu$
Work Step by Step
Ideal gas relation: $PV=mRT$
At the initial state ($V_1=25ft³, P_1=P_2=40psia$,
$T_1=700°F=1160°R, R=0.3704\ psia.ft³/lbm.°R$):
We can solve for the mass: $m=2.327\ lbm$
The energy balance for this system results in:
$Q=\Delta H = mc_p\Delta T$
With $c_p=0.247\ Btu/lbm.°R$:
$Q=-287.38\ Btu$