Question: Given a set $X$ and a family $\mathcal{S}$ of subsets of $X$, prove that there exists a topology $\mathcal{T}(\mathcal{S})$ on $X$ which contains $\mathcal{S}$ and is the smallest with this property (Hint: use the axioms to see what other subsets of $X$, besides the ones from $\mathcal{S}$, must $\mathcal{T}(\mathcal{S})$ contain.)

I checked the axioms of a topology and I think the other subset $\mathcal{T}(\mathcal{S})$ has to contain is $X$ (for the first axiom). Is this correct? and why is this the smallest topology? How do I prove that?

Answer: 
The "smallest" topology $\mathcal{T}(S)$ is the topology such that if $T'$ is any other topology containing the subsets in the collection $S$, then $\mathcal{T}(S) \subseteq T'$.

As the other answerers have pointed out, consider taking every topology on the set $X$ which contains all of the sets in $S$, and then take the intersection of all of those topologies. We get another topology! To show this:

Consider $(\mathcal{T}\_{i})\_{i \in I}$ to be the collection of topologies on $X$ in which each topology $\mathcal{T}\_{i}$ contains the sets in $S$. We are interested in three things:

1. **Is this intersection non-empty?** Yes! Since the power set of $X$, $\mathcal{P}(X)$ is a topology which contains every set in the collection $S$, and also since the set $X$ is an element of every topology, the intersection of the topologies is non-empty.
2. **Is the intersection a topology?** Yes! You should prove this (it's very easy). Suppose $\mathcal{T}\_{i}$ is a topology for each $i \in I$. Suppose the intersection $\cap\_{i \in I} \mathcal{T}\_{i}$ is non-empty. Then this intersection is also a topology. Prove it.
3. **Once we establish that for the topologies $\mathcal{T}\_{i}$ that contain the collection $S$, $\cap\_{i \in I} \mathcal{T}\_{i}$ is a topology, then we want to know if this topology contains the collection $S$. Does it?** Yes! Why?
4. **Finally, do we have that $\cap\_{i \in I} \mathcal{T}\_{i} \subseteq T$ for any topology $T$ which contains the collection of sets $S$?** Yes! Why?
The intersection of an arbitrary non-empty family of topologies containing $\mathcal{S}$ is still a topology. In this case the family is non-empty, indeed it contains the power set of $X$.