Time and Work Problem

Problem : men(x1)  or women(y1) can complete a work in days(z1). men(x2) and women(y2) started doing the work. After days(z2), men(x3) and women(y3) left the work.
The Rest shall finish the work  in how many days ? Answer - days(z3)
Total no. of days to complete the work ?                  Answer-   days(z2+z3)
Formula-( z1-z2*A1)/(A1-A2) where A1=(x2/x1) + (y2/y1) and A2= (x3/x1) + (y3/y1)