Atomic masses can be used in place of nuclear masses here because the number of electrons is the same on both sides, so their masses cancel. A positive Q means energy is released (exothermic); a negative Q means energy must be supplied (endothermic).
(i)
Δm=m(1H)+m(3H)−2m(2H)=1.007825+3.016049−2×2.014102=−0.004330 u
Q=−0.004330×931.5 MeV=−4.03 MeV
Q is negative, so the reaction is endothermic: 4.03 MeV must be supplied.
(ii)
Δm=2×12.000000−19.992439−4.002603=0.004958 u
Q=0.004958×931.5 MeV=4.62 MeV
Q is positive, so the reaction is exothermic: 4.62 MeV is released.