Final answer:
There are 5 balls in the bag.
Step-by-step explanation:
Let's assume the total number of balls in the bag is x.
Given that 3/10 of the balls are red, we can write it as 3/10x.
Given that 2/5 of the balls are green, we can write it as 2/5x.
Since the rest of the balls are blue and yellow, we can write it as x - (3/10x + 2/5x).
Given that there are twice as many blue and yellow balls, we can write it as 2(x - (3/10x + 2/5x)).
Given that there are 17 fewer blue balls than red balls, we can write it as 2(x - (3/10x + 2/5x)) - 17 = 3/10x.
Simplifying the equation, we get 35x - 17 = 3x. Solving for x, we find x = 5.
Therefore, there are 5 balls in the bag.
Learn more about Total number of balls in the bag