First, lets find the volume of the tank. Since the tank has a shape of a rectangular prism, then the volume is:
we have that the volume of the tank is 3000 cm^3. Since the generator will run 2 hours on a liter of gas, then:
therefore, the generator will run for 6 hours