The coordinates of the ends of the hypotenuse are \( (0, a) \) and \( (a, 0) \). Let the third vertex be \( (x, y) \).
Since the triangle is a right-angled triangle, we use the property that the locus of the third vertex in a right-angled triangle with the hypotenuse along the coordinate axes is a circle.
Equation of the right-angled triangle.
By using the distance formula, the lengths of the sides of the triangle are:
\[
\text{Distance between } (0, a) \text{ and } (x, y) = \sqrt{x^2 + (y-a)^2}
\]
\[
\text{Distance between } (a, 0) \text{ and } (x, y) = \sqrt{(x-a)^2 + y^2}
\]
The right angle condition gives us the equation:
\[
x^2 + y^2 - ax - ay = 0
\]
Thus, the correct equation for the locus of the third vertex is \( \boxed{x^2 + y^2 - ax - ay = 0} \).