This Answer provides an entirely different method of solving the present problem, based on treating the box and surroundings as a closed system (and thus using the closed system version of the first law of thermodynamics).  This is the approach alluded to by @pglpm in one of his comments.  Rather than considering the surroundings outside the box as being infinite, we consider the gas outside the box as being enclosed within a larger adiabatic container of *finite volume*.  We then solve this problem in the limit as the outer container volume becomes infinite.

Here are the parameters employed in the present analysis:

**Box**:

$n_0$ = number of moles of gas in box initially

V = Volume of box

$T_0$ = Initial Temperature

$p_0$ = Initial Pressure

n = number of moles in box in final state

T = Temperature in box in final state

p* = Pressure in box in final state (identical to final pressure outside box)

**Outside Enclosure:**

$n_{s0}$ = number of moles of gas in enclosure initially

$V_s$ = Volume of enclosure

$T_0$ = Initial temperature

p = Initial pressure

$n_s$ = Final number of moles in enclosure

T* = Final temperature of gas in enclosure

p* = Final pressure of gas in enclosure (identical to final pressure in box)

From the ideal gas law, we have:
$$n_0=\frac{p_0V}{RT_0}\tag{1a}$$
$$n=\frac{p^*V}{RT}\tag{1b}$$
$$n_{s0}=\frac{pV_S}{RT_0}\tag{1c}$$
$$n_s=\frac{p^*V_S}{RT^*}\tag{1d}$$

As shown in Example 6.10 of Fundamentals of Engineering Thermodynamics by Moran et al, when a gas within an adiabatic enclosure escapes very slowly (in our case into the box), the gas that still remains inside the enclosure at any time during the process has suffered an adiabatic reversible expansion. This means that the final pressure and temperature of the gas in the enclosure will be less than the initial pressure and temperature.  Furthermore, quantitatively, we will have that:
$$p^*\left(\frac{V_s}{n_s}\right)^{\gamma}=p\left(\frac{V_s}{n_{s0}}\right)^{\gamma}$$or equivalently, $$\frac{n_s}{n_{s0}}=\left(\frac{p^*}{p}\right)^{1/\gamma}$$or equivalently,$$n_s=\frac{pV_S}{RT_0}\left(\frac{p^*}{p}\right)^{1/\gamma}\tag{2}$$Moreover, we have:
$$\frac{T^*}{T_0}=\left(\frac{p^*}{p}\right)^{\frac{\gamma - 1}{\gamma}}\tag{3}$$

TO BE CONTINUED