(1,4) is a point that is connected to the midpoint of (3,-2) and (x,4). If you think carefully, (1,4) is a point that is located to the first quadrant, (3,-2) in the fourth quadrant, and (x,4) is in rather 1st or 2nd quadrant. If you continue to connect the two of them by putting a line diagonally to the direction of north west from (3,-2). All we know is, when we find the midpoint of (3,-2) and (x,4):
M(x,y)=((3+x)/2, (-2+4)/2)
M(x,y)=((3+x)/2,1)
That means the 1 is in either first or 2nd quadrant.
Now lets use distance formula
5=√[(3+x-1)²+(-2-1)²]
5=√[(2+x)²+9]
square both sides
25=(2+x)²+9
Subtract both sides by 9
16=(2+x)²
Square root both sides
(posineg)4=2+x
Subtract 2 from both sides
(posineg)4-2=x
Therefore x has the value of either:
x=2
or x=-6
Hope this helps =)