We have to be careful here. One good way to do that is by separating into two cases: ends with 0 and ends with 5. If we know that the last digit is 0, then there are 9 choices for the first digit, 8 choices for the second digit, and 7 choices for the third digit, so there are \(9\cdot 8\cdot 7\) numbers ending with 0. When the final digit is 5, the first digit only has \(8\) choices (0 and 5 are excluded). The second digit can be any of \(8\) digits (not the first digit and not 5). The third digit can be any of the remaining \(7\) digits. Thus, there are \(8\cdot 8\cdot 7\) numbers ending with 5. Since these two groups are exclusive, we can add and have
\begin{equation*}
9\cdot 8\cdot 7 + 8\cdot 8\cdot 7 = 17\cdot 8\cdot 7
\end{equation*}
\(4\)-digit numbers with distinct digits that are divisible by \(5\text{.}\) One way to come up with the \(17\) on its own would be to recognize that there are \(18\) choices for the first and last digits in a \(4\)-digit number that is divisible by \(5\) (9 choices for the first digit and two choices for the last digit), but this allows for numbers where the first and last digits are both \(5\text{.}\) We need to exclude that to get at distinct digits, so we have \(18-1=17\text{.}\)