This is a transient problem with no heat transfer and no work. The balance equations for the tank as C.V. become
Continuity Eq.: m2 – 0 = mi
Energy Eq.: m2u2 – 0 = mi hi + Q – W = mi hi + 0 – 0
Final state: u2 = hi & P2 = Pi
T2 > Ti and it does not depend on V