12 × 280 = 140 balls
So, there were 140 blue balls.
40% of the balls were red.
40100 × 280 = 112 balls
So, there were 112 red balls.
Number of blue balls + Number of red balls = 140 + 112 = 252
Number of yellow balls = 280 – 252 = 28 balls
Therefore, there were 28 yellow balls.