Height of the pole : 10 m. jump amount each attempt: 2 m.
slipping amount each time: 1 m.
the jump height slipped final
number reached height position
1 2m 1m 1 m
2 3m 1m 2m
8 9m 1m 8m
Thus after the 9th attempt/jump, the spider reaches the top of the pole/roof. Since it goes to the horizontal position, spider does not slip down.
from the first two attempts/jumps, we see that the spider's final position N meters is equal to the number of jumps N.
we need to find when the spider attains 10 m (target height) - 2 m (jumping height) = 8 meters. Because, from 8 m the spider can reach the top and stay there without slipping.
So to attain 8 m (after slipping), it takes 8 attempts. In the 9th attempt, the spider goes to the top.