You can put this solution on YOUR website! Using formula:
Square root of (x2 - x1)^2 + (y2 - y1)^2
Using (a, 7) and (2, 1)
Square root of(2 - a)^2 + (1 - 7)^2
Square root of (4 - 4a + a^2)+ (36)
Square root of (a^2 - 4a + 4 + 36)
Square root of a^2 - 4a + 40
Square root of a^2 - 4a + 40 = 3 sqrt(5)
Discarding square roots.
a^2 - 4a + 40 = 45 (sqrt(9*5))
a^2 - 4a - 5 = 0
(a + 1)(a - 5) = 0
a + 1 = 0
a = -1
a - 5 = 0
a = 5
These are the two values for a:
-1 and 5
Hope this helps.
:-)