Amálka observed squirrels in the garden of the nursery, where these three trees grew: spruce, beech, and fir. The squirrels were sitting quietly on the trees, so she could count them - there were 34 of them. When 7 squirrels jumped from the spruce to the beech, there were as many on the beech as on both conifers combined. Then, 5 more squirrels jumped from the fir to the beech, at which point there were as many squirrels on the fir as on the spruce. On the beech, there were then twice as many as on the fir at the beginning. How many squirrels were originally sitting on each of the trees?

(M. Mach)

Idea. Form a system of equations. Before solving the system, notice that some equations are redundant, meaning they can be derived from the others.
Let the original number of squirrels on the spruce be $s$, on the beech $b$, and on the pine $j$. From the problem, we can set up a system of four equations with these three unknowns:

$$
\begin{aligned}
s+b+j & =34, \\
b+7 & =j+s-7, \\
j-5 & =s-7, \\
b+7+5 & =2 j .
\end{aligned}
$$

Notice that by adding the third and fourth equations, we get the second equation. Therefore, to solve the system of equations, it is sufficient to choose any two of these three equations and add the first equation. This gives us a system of three equations with three unknowns. Let's solve the system using the first, second, and fourth equations:

$$
\begin{aligned}
s+b+j & =34, \\
b+7 & =j+s-7, \\
b+7+5 & =2 j .
\end{aligned}
$$

Add the first two equations and simplify:

$$
\begin{aligned}
s+2 b+j+7 & =27+j+s, \\
2 b & =20, \\
b & =10 .
\end{aligned}
$$

Substitute this result into the last equation and solve for $j$:

$$
\begin{array}{r}
10+7+5=2 j \\
22=2 j \\
j=11 .
\end{array}
$$

Substitute all values into the first equation and solve for $s$:

$$
\begin{aligned}
s+10+11 & =34 \\
s & =13 .
\end{aligned}
$$

Originally, there were 13 squirrels on the spruce, 10 on the beech, and 11 on the pine.

Another idea. Determine how many squirrels were on the beech at the moment when there were as many squirrels on it as on both conifers.

Another solution. After the first jump, there were exactly half of the squirrels on the beech, which is 17. Since 7 squirrels jumped to the beech, there were originally $17-7=10$ squirrels on the beech.

After the second jump, there were $17+5=22$ squirrels on the beech. We know that at the end, there were twice as many squirrels on the beech as there were on the pine at the beginning, so there were $22 \div 2=11$ squirrels on the pine at the beginning.

In total, there were 34 squirrels, so there were originally $34-10-11=13$ squirrels on the spruce. We have arrived at the original number of squirrels on all trees without using the given information that after all the jumps, there were the same number of squirrels on the pine as on the spruce. We need to verify that this information is not in conflict with our previous calculations: $11-5=13-7$, so our results match the entire problem.

Originally, there were 13 squirrels on the spruce, 10 on the beech, and 11 on the pine.

Note. The solutions presented offer different perspectives on the same problem. Compare, in particular, how we identified the redundancy of one of the given pieces of information in the first and how in the second case. Could you identify this redundancy in another way?