Let $M$ be a metric space and consider $Y(M)$ the set of all closed and bounded subsets of $M$. Consider the function $ p:y\left( M \right)^2 \to R $ defined by:
$ p\left( {X,Y} \right) = \max \left\{ {\mathop {\sup }\limits_{x \in X}\, d\left( {x,Y} \right),\mathop {\sup }\limits_{y \in Y}\, d\left( {y,X} \right)} \right\} $ where the distance of a point $x$ and a set $A$ is defined by:
$ d\left( {x,A} \right) = \inf \left\{ {d\left( {x,a} \right);a \in A} \right\} $ Prove that this function is a distance.
I proved all the properties except the triangular inequality. How can I prove it?