its a matter of calculating the two speeds of filling and then add them together.
speed1 = 140 liters / 8 minutes = 17.5 liters per minute
speed2 = 130 liters / 7 minutes = 18.57 liters per minute
So we'll open both keys with speed1 and speed2, x amount of minutes, and fill 400 liters, if we write an equation of these statement that is:
17.5x + 18.57x = 400
solve for x!
36.07x = 400
x = 11.09
therefore it will take 11.09 minutes to fill the 400 liters tank with both keys open.