The distance between points $ A $ and $ B $ is :
$$ d(A, B) = 3 \sqrt{ 10 } $$To find distance between points $ A(x_1,y_1)$ and $ B(x_2,y_2)$, we use formula:
$$ \color{blue}{ d(A,B) = \sqrt{(x_2 - x_1)^2+(y_2 - y_1)^2} } $$In this example we have:
$$ \begin{aligned} & A \left(5,~9\right) \implies x_1 = 5 ~~\text{and}~~ y_1 = 9 \\[1 em] & B \left(8,~0\right) \implies x_2 = 8 ~~\text{and}~~ y_2 = 0 \end{aligned} $$Substituting $ x_1 $, $ x_2 $, $ y_1 $ and $ y_2 $ into the formula above yields:
$$ \begin{aligned} d(A,B) & = \sqrt{\left( 8 - 5 \right)^2 + \left( 0 - 9 \right)^2} \\[1 em] d(A,B) & = \sqrt{ 3^2 + (-9)^2 } \\[1 em] d(A,B) & = \sqrt{ 9 + 81 } \\[1 em] d(A,B) & = \sqrt{ 90 } \\[1 em] d(A,B) & = 3 \sqrt{ 10 } \end{aligned} $$