The formula for calculating the distance between two points is:
#d = sqrt((color(red)(x_2) - color(blue)(x_1))^2 + (color(red)(y_2) - color(blue)(y_1))^2)#
Substituting the values from the points and for the distance in the problem gives:
#5 = sqrt((color(red)(5) - color(blue)(a))^2 + (color(red)(-1) - color(blue)(3))^2)#
We can now solve for #a#:
Squaring both sides of the equation gives:
#5^2 = (sqrt((color(red)(5) - color(blue)(a))^2 + (color(red)(-1) - color(blue)(3))^2))^2#
#25 = (color(red)(5) - color(blue)(a))^2 + (color(red)(-1) - color(blue)(3))^2#
#25 = (color(red)(5) - color(blue)(a))^2 + (-4)^2#
#25 = (color(red)(5) - color(blue)(a))^2 + 16#
#25 = 25 - 10a + a^2 + 16#
#-color(red)(25) + 25 = -color(red)(25) + 25 - 10a + a^2 + 16#
#0 = 0 - 10a + a^2 + 16#
#0 = -10a + a^2 + 16#
#0 = a^2 - 10a + 16#
#0 = (a - 8)(a - 2)#
#(a - 8)(a - 2) = 0#
Now, solve each term for #0#:
Solution 1)
#a - 8 = 0#
#a - 8 + color(red)(8) = 0 + color(red)(8)#
#a - 0 = 8#
#a = 8#
Solution 2)
#a - 2 = 0#
#a - 2 + color(red)(2) = 0 + color(red)(2)#
#a - 0 = 2#
#a = 2#
The solution is: #a# can be either #8# or #2#