There is tank that holds 400 gallons of water. You've got one pipe that can fill it up in 15 minutes. Another pipe can empty it in 40 minutes. If both pipes are open at the same time, how long does it take to fill the tank?
Make this chart:
                No. of
                tanks         Time in       Rate in
                filled        minutes     tanks/minute     
fill pipe          
drain pipe         
both together     
Let x = the number of minutes to fill the tank when both are open.
Fill x in for the time for "both together".  Also fill in the given
times for the two pipes indivisuallty, 15 and 40 minutes:
                No. of
                tanks         Time in       Rate in
                filled        minutes     tanks/minute     
fill pipe                       15            
drain pipe                      40             
both together                    x            
Next fill in the number of tanks filled.  The drain pipe "fills"
"negative one" tanks.  (To drain one tank is considered the same
mathematically as "filling negative one tanks").  So we fill in
for the number of tabks "filled":
                No. of
                tanks         Time in       Rate in
                filled        minutes     tanks/minute     
fill pipe         +1            15             
drain pipe        -1            40             
both together     +1             x            
Next we fill in the rates by dividing tanks by minutes:
                No. of
                tanks         Time in       Rate in
                filled        minutes     tanks/minute     
fill pipe         +1            15            +1/15 
drain pipe        -1            40            -1/40 
both together     +1             x            +1/x
Make the equation from
Rate of fill pipe + Rate of drain pipe = Reate of both together
                    
                           
Multiply through by LCM of 120x:
                  
                           
                              
                               
Answer: 24 minutes
Edwin