Carol puts some green cubes and red cubes in a box. The ratio is 2:1. She adds 12 more cubes to the red cubes in the box and the ratio becomes 4:5. How many green cubes were in the box?