Let R1 = rate of flow of water from pipe 1 ( Volume flowing per hour)
and V = volume of tank
R1 = V/t1 = V /4
For pipe 2
R2 = V/ 6
T = time when both pipes are used
T = V / (R1 + R2)
T = V/ ( V/4 + V/6 )
Time taken = 2.4 hrs