A certains color paint should have a mix of blue and green in a ratio of 5:2. If a house painter needs to use 8 gallon of green paint, how many gallons of blue paint should he mix with it in order to obtain the right colors?