How is $U=\{x\in X | d(p,x)>r\} $ open? I know that $U=\{x\in X | d(p,x)<r, p\in X\}$ is open but in one of my exercises I am asked to show that $U$ is open if $U=\{d(p,x)>r\}$. I am not sure if I follow since this contradicts the definition of an open set.
 A: The set $ U $ is indeed open - it's just not an open ball. The definition of an open set is that for every point $ x \in U $ there exists an open ball of finite size $ a $ centered at $ x $ such that for every point $ y $ in the ball, $ y \in U $. Let's say $ x $ is distance $ s > r $ from $ p $. You can use the triangle inequality (which is a property of distance metrics) to show that all points in a ball of radius $ a = \frac{s - r}{2} $ around $ x $ are in $ U $.
Proof: Let's say $ d \left ( p, x \right ) = s $ and $ d \left ( x, y \right ) < \frac{s - r}{2} $. The triangle inequality says:
\begin{align}
d \left ( p, y \right ) + d \left ( y, x \right ) & \geq  d \left ( p, x \right ) \\
d \left ( p, y \right ) + d \left ( y, x \right ) & \geq s \\
d \left ( p, y \right ) & \geq s - \frac{s - r}{2} = \frac{s + r}{2} > r
\end{align}
$ U $ is, as you correctly pointed out in the comments, not an open ball itself. This Wikipedia article explains how an open set is defined in terms of open balls.
A: Let $X$ be some metric space with a metric $d$.
Definition: An open BALL, $B_r{x}$ (or some similar notation) is the set of $\{y \in X| d(y,x) < r\}$. This is nothing more or less than a set of points.  
Definition: An open SET is a set, $S$ so that for every point, $x \in S$ there exists some value $r > 0$ so the $B_r(x) \subset S$.  These sets can be ... all sorts of "shapes and sizes".  Being open is a property.
So for example:  $(-\infty, 1)$ is an open set.   The point $0.9999999$ is has an open ball completely inside but $(0,1)$. If $r = .00000001$ then $\{y|d(0.9999999,y) < 0.00000001\} = (0.9999998,0.99999991) \subset (-\infty, 1)$.
That's one point that has an open ball.  Because that point was so very, very close to "the edge" we had to find an open ball with a very, very small radius to fit in in $(-\infty, 1)$.  But that doesn't have an effect on the radius of $S$ itself.
But we can't show $(-\infty, 1)$ is open, just by showing one point.  We have to prove it for all $x\in (-\infty, 1)$.
For $x \in (-\infty, 1) $ we know $x < 1$ let $r = 1 -x$.  Then $B_r(x) = \{y| d(x,y) < 1- x\}$ so $y< x + (1-x) = 1$.  So $y \in (-\infty, 1)$ so $B_r(x) \subset S$. 
As this is true for any $x \in (-\infty, 1)$ we know $(-\infty, 1)$ is open.
Now an example of a set that is NOT open is $(0, 1]$.  Let $r > 0$ then $B_r(1)$ contains $y$ that are larger than $1$.  This will be true no matter how small we make $r$.  So $B_r(1) \not \subset (0, 1]$.  So $(0,1]$ is not open.
So what about $U= \{x\in X|d(x,p) > r\}$ is that open or not.  
Hint:
Let $x \in U$. Then $d(p,x) >r$ Let $s < \frac 12*(d(p,x) - r)$.  Is $B_s(x) \subset U$?
Hint for that question:  Let $z \in B_s(x)$.  Is $z \in U$?  What is $d(p,z)$?  Is $d(p,z)> r$
Hint for THAT question: What is $d(p,x)$?  What is $d(x, z)$ what is $d(p,x) + d(p,z)$?
