The key to solving this kind of problems is to draw a diagram, and name the unknowns. After that, state the formulas that relate the unknown(s). Some times at the end, only one unknown is left, and you can therefore solve the problem.
Let A be the end of the shadow, and C be the bottom of the pole on the slope.
D be a point directly below C on a horizontal plane at the same level as A (i.e. on a horizontal surface below the slope).
Let B be the top of the pole.
Let
The height of the pole is x (=distance CB).
The distance between C and D be y.
From the definition of sine, we have
CD=y=20 sin(8°) and
From the definition of cosine, we have
AD=20 cos(8°)
and from the definition of tangent,
BD=AD tan(17°).
Using the diagram,
x=BD-CD=AD tan(17°)-20sin(8°)
=(20cos(8°))tan(17°)-20sin(8°)
So everything is known and x can be calculated using a calculator.
I get x=5.9m.