I strongly suspect there is a misprint in the exam paper, and that the holomorphic map is supposed to satisfy $f(0)={1\over 2}$ and $f({1\over 2})=0$, as everything makes a lot more sense then.
You cannot use the Schwarz lemma, since you do not have $f(0)=0$. But there is a generalization of this result called the Schwarz-Pick theorem, which is valid for any holomorphic map from $D$ to $D$. The Schwarz-Pick theorem supplies you with the inequality ${|f'(z)|\over 1-|f(z)|^2}\leq {1\over 1-|z|^2}$, and when you use this on the two points in the problem you get that (3) is true.
In fact, even more can be said about $f(z)$! Since the two points $0$ and $1\over 2$ are interchanged, the hyperbolic distance between them is preserved, and $f(z)$ has to be a Möbius transformation. A little computation shows that the only possible solution is $f(z)={2z-1 \over z-2}$, and that the inequalities on $|f'(0)|$ and $|f'({1\over 2})|$ are in fact equalities.
It is quite easy to get the Schwarz-Pick theorem from the Schwarz lemma. If the point you are interested in is mapped to some other point, you just compose your function with suitable Möbius transformations to get a map which sends $0$ to $0$, and use the Schwarz lemma on this composition. Unraveling the result gives you the Schwarz-Pick theorem.
One nice way to state the Schwarz-Pick theorem is that no holomorphic map from $D$ to $D$ can increase hyperbolic distance between any two points. You can get to a lot of very beautiful mathematics if you study this topic.