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)#

Now, substitute #d# and the values from the points given in the problem and solve for #a#:

#7 = sqrt((color(red)(a) - color(blue)(-9))^2 + (color(red)(5) - color(blue)(-2))^2)#

#7 = sqrt((color(red)(a) + color(blue)(9))^2 + (color(red)(5) + color(blue)(2))^2)#

#7 = sqrt((color(red)(a) + color(blue)(9))^2 + (7)^2)#

#7 = sqrt((color(red)(a) + color(blue)(9))^2 + 49)#

#7^2 = (sqrt((color(red)(a) + color(blue)(9))^2 + 49))^2#

#49 = (color(red)(a) + color(blue)(9))^2 + 49#

#49 - color(red)(49) = (color(red)(a) + color(blue)(9))^2 + 49 - color(red)(49)#

#0 = (color(red)(a) + color(blue)(9))^2 + 0#

#0 = (color(red)(a) + color(blue)(9))^2#

#0 = (color(red)(a) + color(blue)(9))(color(red)(a) + color(blue)(9))#

We can now solve #a + 9# for #0#:

#a + 9 = 0#

#a + 9 - color(red)(9) = 0 - color(red)(9)#

#a + 0 = -9#

#a = -9#

#-9# is a possible value for #a#.