for the first one you're trying to find the distance between the points and .

All you have to do is use pythagorus' theorem, you form a right angled triangle with sides of length and find out the length of the hypotenuse (and hence the distance between the points)

so