# Find the value of x so the distance between the points A(3,5) and B(x,8) is 5 units.

*print*Print*list*Cite

Given the points : A(3, 5) and B(x, 8) such that the distance is 5 units:

We will use the distance formula :

AB = sqrt[( xB-xA)^2 + (yB-yA)^2 ]

= sqrt[ ( x -3)^2 + ( 8 - 5)^2]

= sqrt[(x^2 - 6x + 9 + 3^2)

= sqrt(x^2 - 6x + 9 + 9)

= sqrt(x^2 - 6x + 18)

But we know that AB = 5

==> sqrt(x^2 - 6x + 18) = 5

Square both sides:

==> x^2 - 6x + 18 = 25

==> x^2 - 6x + 18 -25 = 0

==> x^2 - 6x - 7 = 0

==> We will factor:

==>(x-7) ( x+ 1) = 0

==> x1= 7

==> x2 = -1

Then we have two solutions:

**B ( 7,8) OR B(-1, 8)**

The problem provides the length of the segment `AB = 5` , hence, using Pythagorean theorem yields:

`AB^2 = (3 - x)^2 + (5 - 8)^2 `

`5^2 = 9 - 6x + x^2 + 9 => 25 - 18 = x^2 - 6x`

`x^2 - 6x - 7 = 0`

You may use the factorization to evaluate the solutions to quadratic equation, such that:

`x^2 - 7x + x - 7 = 0 => (x^2 - 7x) + (x - 7) = 0`

`x(x - 7) + (x - 7) = 0 => (x - 7)(x + 1) = 0 => {(x - 7 = 0),(x + 1 = 0):} => {(x = 7),(x = -1):} `

**Hence, evaluating the missing coordinate x yields that there exists two points whose y coordinate is `y = 8` , such that:` x = 7, B(7,8)` and **`x = -1, B (-1,8).`

We have to find x if the distance between (3,5 ) and ( x,8) is 5.

Now the distance between ( x1, y1) and ( x2, y2) is given by sqrt[(x1-x2)^2+(y1-y2)^]

Here x1 = 3, y1 = 5, x2 = x and y2 = 8

=> sqrt [ (3-x)^2 + (5-8)^2] = 5

take square of both the sides

=> (3-x)^2 + (5-8)^2 = 25

=> (3 -x)^2 + 9 = 25

subtract 9 from both the sides.

=> (3 - x)^2 = 25 - 9

=> (3 - x)^2 = 16

take the square root

=> 3 -x = 4 or 3-x = -4

=> x = -1 or x = 7

**Therefore x can be either -1 or 7.**

We'll write the distance formula:

d = sqrt[(xB - xA)^2 + (yB - yA)^2]

We'll substitute the coordinates for A and B in the formula:

A(3,5) and B(x,8)

d = sqrt[(x - 3)^2 + (8 - 5)^2]

We'll substitute the distance by 5:

5 = sqrt[(x - 3)^2 + (3)^2]

We'll raise to square both sides:

25 = (x-3)^2 + 9

We'll subtract 9 both sides:

25 - 9 = (x-3)^2

16 = (x-3)^2

We'll extract the square root:

x-3 = +4

**x = 7**

or

x - 3 = -4

**x = -1**

**Both values of x are valid solutions.**

The distance d between the points (x1,y1) and (x2,y2) is given by:

d^2 = (x2-x1)^2+(y2-y1)^2.

Therefore the distance between the points A(3,5) and B(x,8) is given by:

d^2 = (x-3)^2+(8-5)^2.

Since the actual distance d between A and B is 5, we get:

5^2 = (x-3)^2 +3^2.

25 = (x-3)^2 +9.

25-9 = (x-3)^2.

16 = (x-3)^2.

Taking the square root, we get:

(x-3) = sqrt16 = 4, Or x-3 = -sqrt16 = -4.

Therefore x= 4+3 = 7. Or x= -4+3 = -1.

Therefore x coordinate can be 7 or -1.