By one magic nut, Wicked Witch can either turn a flea into a beetle or a spider into a bug; while by one magic acorn, she can either turn a flea into a spider or a beetle into a bug. In the evening Wicked Witch had spent 20 magic nuts and 23 magic acorns. By these actions, the number of beetles increased by 5. Determine what was the change in the number of spiders. (Find all possible answers and prove that the other answers are impossible.)
1. **Define the variables and changes:**
   - Let \( x \) be the number of times the Wicked Witch uses a magic nut to turn a flea into a beetle.
   - Let \( y \) be the number of times the Wicked Witch uses a magic acorn to turn a flea into a spider.
   - The total number of magic nuts used is 20.
   - The total number of magic acorns used is 23.

2. **Set up the equations for the changes:**
   - Using a magic nut to turn a flea into a beetle results in a change of \((-1, 1, 0, 0)\).
   - Using a magic nut to turn a spider into a bug results in a change of \((0, 0, -1, 1)\).
   - Using a magic acorn to turn a flea into a spider results in a change of \((-1, 0, 1, 0)\).
   - Using a magic acorn to turn a beetle into a bug results in a change of \((0, -1, 0, 1)\).

3. **Express the total changes:**
   - Let \( a \) be the number of times the Wicked Witch uses a magic nut to turn a spider into a bug.
   - Let \( b \) be the number of times the Wicked Witch uses a magic acorn to turn a beetle into a bug.
   - The total changes can be expressed as:
     \[
     \begin{cases}
     -x - y & \text{(change in fleas)} \\
     x - b & \text{(change in beetles)} \\
     y - a & \text{(change in spiders)} \\
     a + b & \text{(change in bugs)}
     \end{cases}
     \]

4. **Set up the equations based on the given conditions:**
   - The total number of magic nuts used is 20:
     \[
     x + a = 20
     \]
   - The total number of magic acorns used is 23:
     \[
     y + b = 23
     \]
   - The number of beetles increased by 5:
     \[
     x - b = 5
     \]

5. **Solve the system of equations:**
   - From \( x - b = 5 \), we get:
     \[
     b = x - 5
     \]
   - Substitute \( b = x - 5 \) into \( y + b = 23 \):
     \[
     y + (x - 5) = 23 \implies y + x - 5 = 23 \implies y + x = 28
     \]
   - Substitute \( x + a = 20 \) into \( y + x = 28 \):
     \[
     y + (20 - a) = 28 \implies y + 20 - a = 28 \implies y - a = 8
     \]

6. **Determine the change in the number of spiders:**
   - The change in the number of spiders is \( y - a \):
     \[
     y - a = 8
     \]

The final answer is \( \boxed{8} \).