The graph of the quadratic function \( y = x^2 - 6x + 8 \) intersects the x-axis at points \( A \) and \( B \). The line segment \( AB \) forms the hypotenuse of a right triangle with the x-axis as one of its legs. Find the length of the other leg of the triangle. Let's think step by step and output the final answer within \boxed{}.
user