Let M, N and P be integers.

we want to fill 120 liters in N cans of capacity V liters.

and also fill 180 litres in M cans of capacity V litres.

and also fill 240 litres in P cans of capacity V litres.

120 = 2 * 2 * 3 * 5 * 2 = N * V

180 = 2 * 2 * 3 * 5 * 3 = M * V

240 = 2 * 2 * 3 * 5 * 4 = P * V

V is the common factor of 120 , 180 and 240. It can be 2 or 4 or 6 or 12 or 10 or 15 or 30 or 20 or 60.

As we want the greatest capacity of V, then it is the greatest common divisor or factor of 120, 180 and 240. We can see the GCD of these numbers from the above prime factors of these numbers.

As GCD (120, 180, 240) = 2*2*3*5 = 60, the answer is 60 litres.