Let B be the number of blue balls;
then the number of red balls is (B+6), and the number of green balls is (B-4).
The total is 50, i.e.
B + (B+6) + (B-4) = 50.
Simplify and solve for B
3B +2 = 50
3B = 50 - 2 = 48
B = 48/3 = 16.
ANSWER. There are 16 blue balls.