At the start, the tank contains A(0) = 50 g of salt.
Salt flows in at a rate of
(1 g/L) * (5 L/min) = 5 g/min
and flows out at a rate of
(A(t)/200 g/L) * (5 L/min) = A(t)/40 g/min
so that the amount of salt in the tank at time t changes according to
A'(t) = 5 - A(t)/40
Solve the ODE for A(t):
A'(t) + A(t)/40 = 5
e^(t/40) A'(t) + e^(t/40)/40 A(t) = 5e^(t/40)
(e^(t/40) A(t))' = 5e^(t/40)
e^(t/40) A(t) = 200e^(t/40) + C
A(t) = 200 + Ce^(-t/40)
Given that A(0) = 50, we find
50 = 200 + C ==> C = -150
so that the amount of salt in the tank at time t is
A(t) = 200 - 150 e^(-t/40)