Because the volume flow rate entering is different from the volume flow rate leaving, you need to write down two differential equations, rather than 1:
Volume Input - Volume Output = accumulation for the volume of fluid in the tank
Chemical X Input - chemical X Output = accumulation for chemical X in the tank
If V(t) is the volume of fluid in the tank at time t, fin is the volumetric flow rate of fluid in, and f_out is the volumetric flow rate of fluid out, what is the differential equation for V?
If C(t) is the concentration of chemical X within the tank at time t, and C_in is the concentration of chemical X in the feed to the tank, what is the differential equation for the rate of change of total chemical X in the tank?
The next step is to multiply the differential equation for V by C, and subtract the resulting relationship from the mass balance on chemical X.