If A(t) is the amount of salt in the tank at time t, then A(0) = 50 g and
A'(t) = (1 g/L)*(3 L/min) - (A(t)/120 g/L)*(3 L/min)
[tex]\implies A'+\dfrac A{40}=3[/tex]
Multiply both sides by [tex]e^{t/40}[/tex], so that the left side can be condensed as the derivative of a product:
[tex]e^{t/40}A'+\dfrac{e^{t/40}}{40}A=3e^{t/40}[/tex]
[tex]\left(e^{t/40}A\right)'=3e^{t/40}[/tex]
Integrate both sides and solve for A(t).
[tex]e^{t/40}A=120e^{t/40}+C[/tex]
[tex]\implies A(t)=120+Ce^{-t/40}[/tex]
Given that A(0) = 50 g, we have
[tex]50=120+C\implies C=-70[/tex]
so that the amount of salt in the tank at time t is
[tex]\boxed{A(t)=120-70e^{-t/40}}[/tex]