Rate out = (A/(total amount of liquid in gallons present at time t)) * (10 gal/min). The total amount of liquid is changing by a net amount of 5 gallons per minute, since the rate out is greater than the rate in. So you have (A/(500-5t))(10)=2A/(100-t). Voila.