1. In a bag, there are 20 balls of three colors: white, black, and red. There is at least one ball of each color. It turned out that if the number of white balls in the bag is doubled, the probability of drawing a white ball will be $\frac{1}{5}$ less than the initial probability of drawing a red ball (before doubling the white balls). Find how many balls of each color were there.
Answer: 5 white, 3 black, and 12 red.

Solution: Let there be $x$ white balls, $y$ black balls, and $z$ red balls. Since there were a total of 20 balls, then $x+y+z=20$. The initial probability of drawing a red ball is

$$
p_{1}=\frac{z}{x+y+z}=\frac{z}{20}
$$

and the probability of drawing a white ball after doubling the white balls is

$$
p_{2}=\frac{2 x}{2 x+y+z}=\frac{2 x}{x+20}
$$

Now we can write the equation

$$
p_{1}-p_{2}=\frac{1}{5} \Longrightarrow \frac{z}{20}-\frac{2 x}{x+20}=\frac{1}{5}
$$

or

$$
z \cdot(x+20) \cdot 5-2 x \cdot 20 \cdot 5=20 \cdot(x+20) .
$$

Dividing both sides by 5 and combining like terms

$$
z x+20 z-44 x=80 \Longrightarrow(x+20)(44-z)=800
$$

It remains to note that since $x+y+z=20$ and each color was present, then $20<x+20<40$. Among the divisors of 800, only 25 and 32 satisfy this inequality. We consider both cases:

I) Suppose $x+20=25$, then $44-z=32$. We get the solution $x=5, z=12$ and $y=3$.

II) Suppose $x+20=32$, then $44-z=25$. We get $x=12$, $z=19$, but then there should be more than 20. Contradiction.

Considering both cases, we conclude that the solution is unique $(x, y, z)=(5,3,12)$.