One of the conditions for forming a triangle is:
The sum of the length of any two sides of a triangle is greater than the length of the third side.
i.e. if we have this triangle:
The condition means:

Let us now apply this condition to the question.
I. If the third side is the largest side:
We have been given two sides with lengths 8 and 17.
Let us make a = 8 and b = 17 and c is the third side
Using the condition we have:

This implies that the length of the third side must be less than 25.
II. If the third side is the smallest side:
Again let us make a = 8 and c = 17 and b is the third side
Using the condition, we have:

This implies that the length of the third side must be greater than 9.
Therefore the answer is Option D