This proof should be easy but I get stuck because I don't know how to deal with the infimum in this case.
I want to prove that $$d(x,A)\le d(x,y)+d(y,A) $$ with $$d(x,A)=\text{inf}(\{d(x,a):a\in A\})$$
My attempt: Let $y\in X$. We have $d(x,a)\le d(x,y)+d(y,a) $ for any $a\in A$.
How can I get the inequality for the infimum from this?