An alternative and slightly quicker route is to work entirely in micrograms and minutes first, and convert to days only at the very end.
Convert the breathing rate to m$^3$/min so it matches the units of concentration: $4 \text{ L/min} = 0.004 \text{ m}^3/\text{min}$.
The rate at which chemical A is inhaled is then:
\[ \text{dose rate} = 50\ \mu g/m^3 \times 0.004\ m^3/\text{min} = 0.2\ \mu g/\text{min} \]
The threshold dose of 5 mg equals $5 \times 1000 = 5000\ \mu g$. The time (in minutes) needed to accumulate this much chemical is:
\[ t = \frac{5000\ \mu g}{0.2\ \mu g/\text{min}} = 25000\ \text{min} \]
Converting minutes to days using $1$ day $= 1440$ min:
\[ t = \frac{25000}{1440} = 17.36\ \text{days} \approx 17.4\ \text{days} \]
This agrees exactly with the mg/L-and-per-day calculation, confirming the result.
\[\boxed{t \approx 17.4 \text{ days}}\]