Let
\(x(t)\) be the amount of salt (in kilograms) in Tank
\(A\) and
\(y(t)\) the amount in Tank
\(B\) at time
\(t\) (in hours). Since each tank has a constant volume of 200 liters, the concentrations are
\(x/200\) and
\(y/200\) kg/L respectively.
Fresh water (zero salt) flows into Tank \(A\) at 200 L/hr, and brine leaves Tank \(A\) into Tank \(B\) at 200 L/hr, so
\begin{equation*}
\frac{dx}{dt} = 0 - 200 \cdot \frac{x}{200} = -x.
\end{equation*}
Brine flows from Tank \(A\) into Tank \(B\) at 200 L/hr and drains from Tank \(B\) at 200 L/hr, so
\begin{equation*}
\frac{dy}{dt} = 200 \cdot \frac{x}{200} - 200 \cdot \frac{y}{200}
= x - y.
\end{equation*}
The initial value problem is therefore
\begin{align*}
x' &= -x, & x(0) &= 20,\\
y' &= x - y, & y(0) &= 10.
\end{align*}
Step 1: Solve for \(x(t)\text{.}\) The equation \(x' = -x\) is separable with general solution \(x = c_1 e^{-t}\text{.}\) Applying \(x(0) = 20\) gives
\begin{equation*}
x(t) = 20e^{-t}.
\end{equation*}
Step 2: Solve for \(y(t)\text{.}\) Substituting \(x(t) = 20e^{-t}\) into \(y' = x - y\) gives the first-order linear equation
\begin{equation*}
y' + y = 20e^{-t}.
\end{equation*}
The integrating factor is \(\mu(t) = e^{t}\text{.}\) Multiplying through,
\begin{equation*}
\frac{d}{dt}\!\left(e^{t} y\right) = 20,
\end{equation*}
and integrating both sides,
\begin{equation*}
e^{t} y = 20t + c_2.
\end{equation*}
Solving for \(y\text{,}\)
\begin{equation*}
y(t) = (20t + c_2)e^{-t}.
\end{equation*}
Applying \(y(0) = 10\) gives \(c_2 = 10\text{,}\) so
\begin{equation*}
y(t) = (20t + 10)e^{-t}.
\end{equation*}
The amount of salt in each tank at time \(t\) is
\begin{align*}
x(t) &= 20e^{-t},\\
y(t) &= (20t + 10)e^{-t}.
\end{align*}
As \(t \to \infty\text{,}\) both \(x(t) \to 0\) and \(y(t) \to 0\text{,}\) since the continuous inflow of fresh water eventually flushes all salt from the system.