A tank has two pipes entering it.when operating together,they fill the tank in 40 minutes.operating independently,one of the pipes fills the tank 60 minutes faster than the other one does. Calculate the time taken by each pipe to fill the tank on its own.

rate of slower --- x units/min

rate of faster ---- y units/min

combined rate = x+y units/min

let the volume of the whole thing have 1 unit
1/(x+y) = 40
x+y = 1/40

1/x - 1/y = 60
(y - x)/xy = 60
60xy = y - x
60xy + x = y
x(60y+1) = y
x = y/(60y+1)

then in x+y = 1/40
y/(60y+1) + y = 1/40
multiply by 40(60y+1)
40y + 40y(60y+1) = 60y+1
40y + 240y^2 + 40y = 60y+1
2400y^2 + 20y - 1 = 0
60y - 1)(40y + 1) = -
y = 1/60 or y is negative, which is not possible

so if y = 1/60, then x = (1/60)/(2) = 1/120

so time of slower = 1/(1/120) = 120 minutes
time for faster = 1/(1/60) = 60 minutes

check:
combined rate = 1/60 + 1/20
= 1/40

time at combined rate = 1/(1/40) = 40 minutes, as given