Show that the discrete topology on $X$ is induced by the discrete metric
Solution 1:
A metric $d$ on a set $X$ induces the topology $\mathcal{T}$ by taking the open balls $B(x,r) = \{y \ : \ d(x,y)<r\}$ as basic open sets. What you need to show is that the $d$ you are given produces the topology $\mathcal{T}$ which is the same one as the discrete one.
In the definition of $d$ the $x=y$ case is included precisely because the definition requires that $d(x,x)=0$. It would be a good exercise to show that this function $d$ is actually a metric.
Now, all we need to do is show that a subset $Y$ of $X$ is open in the discrete topology iff it is a union of open balls. As you noted, every $Y\subseteq X$ is open in the discrete topology, so, all we need to show is that every $Y$ is a union of open balls. I'll get you started. If $Y = \{x\}$ then $Y = B(x,1/2)$ (you should check this). Now, can you show that an arbitrary subset of $X$ is a union of open balls?
Solution 2:
For any $x$ in $X$, $S(x,1)= \{y:d(x,y)<1\}$ But according to definition, $S(x,1)=\{x\}$ which is open in the discrete topology . So we can conclude the result