Answer: 5
===============================================
Step-by-step explanation:
x = total number of balls
x-4 = number of blue
x-4 = number of green
x-4 = number of red
3(x-4) = 3x-12 = total number of blue, green, or red
x - (3x-12) = x-3x+12 = -2x+12 = number of other colors
If there are other colors, then we want this quantity to be larger than 0, so,
-2x+12 > 0
-2x > -12
x < -12/(-2)
x < 6
There are less than 6 balls in the bag.
At the same time, we want each x-4 to be greater than zero
x-4 > 0
x > 4
------------------
We found that x > 4 and x < 6
This combines to 4 < x < 6 which has us land on x = 5
This computes x-4 = 5-4 = 1, showing there's one of each blue, green and red. There are 5-1-1-1 = 2 balls of some other color not mentioned.
------------------
If x = 6, then,
x-4 = 2 each of blue, green and red
There wouldn't be any other color since 6-2-2-2 = 0