Problem 3. On two branches, there were 25 bees. After some time, 5 bees flew from the first branch to the second, and 7 bees flew from the second branch into the field. Then, on the first branch, there were twice as many bees as on the second. How many bees were on each branch at the beginning?
Solution. First method. When 7 sparrows fly away from the field, the total number of sparrows on both branches will be $25-7=18$, and then according to the condition of the problem, the first branch will have twice as many sparrows as the second, meaning the second branch will have $18: 3=6$ sparrows, and the first branch will have $2 \cdot 6=12$ sparrows. Therefore, before 7 sparrows flew away to the field from the second branch, it had $6+7=13$ sparrows. So at the beginning, before 5 sparrows flew from the first branch to the second branch, the second branch had $13-5=8$ sparrows, and the first branch had $12+5=17$ sparrows.

Second method. At the beginning, there were

$$
2 \cdot((25-7): 3)+5=2 \cdot(18: 3)+5=2 \cdot 6+5=12+5=17
$$

sparrows on the first branch and

$$
(25-7): 3+7-5=18: 3+7-5=6+7-5=8
$$

sparrows on the second branch.