To solve this problem, let's break it down step by step.
Step 1: Let's assume the original number of balls in the bag is "x."
- According to the problem, 1/4 of the original balls are red. So, the number of original red balls is (1/4) * x = x/4.
Step 2: Next, 40 more balls are added to the bag, of which 5 are red.
- This means the total number of red balls in the bag now is x/4 + 5.
Step 3: The problem states that 1/5 of all the balls in the bag are red.
- So, we can write the equation x/5 = x/4 + 5.
Step 4: To solve this equation, we will eliminate the fractions by multiplying both sides by 20 (the least common multiple of 4 and 5).
- By doing this, we get 4x = 5x + 100.
Step 5: Now, we can solve for x by simplifying the equation.
- Subtracting 5x from both sides, we get -x = 100.
- Multiplying both sides by -1, we find x = -100.
Step 6: Since we are dealing with a quantity of items (number of balls), we discard the negative solution.
- Therefore, the original number of balls in the bag is x = 100.
Hence, there were originally 100 balls in the bag.