Because Ian put the same number of cars into each box, he put 1/2 of the cars in one box. So, all we need to do to solve this problem is figure out how many total cars there are and divide that number by two.
We figure out how many cars there are by adding the amount of red cars to the amount of black cars. This is 16 + 12 = 28, so there are 28 total cars.
To finish this problem up, we divide 28 by 2. 28/2 = 14, so Ian put 14 cars in each box.