Your original equation
##Q_1 + Q_2 = Q_3 + Q_4##
is based on ##Q_1, Q_2, Q_3## and ##Q_4## all being positive quantities.
##Q_4## is the thermal energy released when the water from the (condensed) steam cools from ##T_i = 100^oC## to ##T_f##.
You have used ##Q_4 = m_{steam} c_w (T_f - T_i)##
But ##T_i > T_f##, so ##T_f - T_i## will be negative and ##Q_4## will be negative, which is wrong.
So you need to make a 'manual adjustment' to allow for this, therefore use
##Q_4 = m_{steam} c_w (T_i – T_f)##
or
##Q_4 = -m_{steam} c_w (T_f – T_i)##
which then makes ##Q_4##, positive, as required.