1, the first one is adiabatic, so q = 0, because the right side is vacuum, the resistance to constant external pressure is 0, w = p △ V, p = 0, w = 0, △ U = q+w = 0.
2, pay attention to all air as a system, because it is an adiabatic constant volume box, Q = 0, W = ∫ PDV, DV = 0,
W=0,,△U=Q+W=0