To solve this problem, we make a component mass balance. Let us say that the salt is called A. Therefore the mass of A in the tank over time is given by the differential equation:
 d(mA) / dt = ΦmA (in) - ΦmA (out) 
 where mA is mass of A, ΦmA mass flow rate of A, and t is time
 Since the fluid being pumped into the tank is pure water, therefore:
 ΦmA (in) = 0
 so,
 d(mA) / dt = - ΦmA (out) 
  
 We also know that:
 mass = concentration * volume
 m = A * V
 Φm = A * ΦV
  
 Therefore:
 d(A * V) / dt = -A ΦV
 Since V is constant, we take it out of the derivative:
 V dA / dt = -A ΦV
 Rearranging:
 dA / A = - ΦV dt / V
 Integrating with limits of:
 A = 40 to A
 t = 0 to t
  
 ln (A / 40) = (- ΦV/V) t
 since it is given that ΦV = 5 L/min and V = 300 L therefore:
 ln (A / 40) = - (5/300) t
 Taking the e on both sides:
 A / 40 = e^-(5t/300)
 A = 40 e^-(5t/300)