[proofplan]
We define $g(z) = f(z)/z$ for $z \neq 0$ and extend it to $g(0) = f'(0)$ by the removable singularity at $0$. The maximum modulus principle on discs $|z| \leq r < 1$ gives $|g(z)| \leq 1/r$; sending $r \to 1^-$ yields $|g(z)| \leq 1$, which is equivalent to $|f(z)| \leq |z|$ and $|f'(0)| \leq 1$. If equality holds at any interior point, the maximum modulus principle forces $g$ to be constant of modulus $1$.
[/proofplan]
[step:Define the auxiliary function $g(z) = f(z)/z$ and extend it to $z = 0$]
Define $g: B(0,1) \to \mathbb{C}$ by
\begin{align*}
g(z) = \begin{cases} f(z)/z & z \neq 0, \\ f'(0) & z = 0. \end{cases}
\end{align*}
Since $f(0) = 0$, the function $f(z)/z$ has a removable singularity at $z = 0$, and $\lim_{z \to 0} f(z)/z = f'(0)$. Hence $g$ is holomorphic on $B(0,1)$.
[/step]
[step:Apply the maximum modulus principle on $|z| \leq r$ and send $r \to 1^-$]
For $0 < r < 1$, the [Maximum Modulus Principle](/theorems/491) applied to the holomorphic function $g$ on the closed disc $\overline{B(0, r)}$ gives:
\begin{align*}
\max_{|z| \leq r}|g(z)| = \max_{|z| = r}|g(z)| = \max_{|z| = r}\frac{|f(z)|}{r} \leq \frac{1}{r},
\end{align*}
where the last inequality uses $|f(z)| \leq 1$ for $z \in B(0,1)$. Fix any $z \in B(0,1)$ and choose $r$ with $|z| < r < 1$. Then $|g(z)| \leq 1/r$. Sending $r \to 1^-$:
\begin{align*}
|g(z)| \leq 1 \quad \text{for all } z \in B(0,1).
\end{align*}
This gives part (1): $|f(z)| = |z||g(z)| \leq |z|$, and part (2): $|f'(0)| = |g(0)| \leq 1$.
[guided]
Why define $g(z) = f(z)/z$? The hypothesis $f(0) = 0$ means $f$ vanishes at the origin, so dividing by $z$ removes the zero without introducing a pole. The resulting function $g$ is holomorphic on the entire disc (including $z = 0$, by the removable singularity theorem), and the bound $|f| \leq 1$ on $B(0,1)$ translates to a bound $|g| \leq 1/|z|$ on the punctured disc.
The maximum modulus principle states that a non-constant holomorphic function on a connected open set cannot attain its maximum modulus in the interior. Applied to $g$ on $\overline{B(0,r)}$: the maximum of $|g|$ is attained on $|z| = r$, where
\begin{align*}
|g(z)| = \frac{|f(z)|}{|z|} = \frac{|f(z)|}{r} \leq \frac{1}{r}.
\end{align*}
Since $|g(z)| \leq 1/r$ for $|z| \leq r$ and this holds for every $r < 1$, we take $r \to 1^-$ to obtain $|g(z)| \leq 1$ throughout $B(0,1)$.
[/guided]
[/step]
[step:Deduce the equality case from the maximum modulus principle]
Suppose $|f(z_0)| = |z_0|$ for some $z_0 \in B(0,1)$ with $z_0 \neq 0$. Then $|g(z_0)| = |f(z_0)|/|z_0| = 1$. Since $|g(z)| \leq 1$ throughout $B(0,1)$, the function $|g|$ attains its maximum value $1$ at the interior point $z_0$. By the [Maximum Modulus Principle](/theorems/491), $g$ must be constant: $g(z) = c$ for some $c \in \mathbb{C}$ with $|c| = 1$. Hence $f(z) = cz$ for all $z \in B(0,1)$.
Similarly, if $|f'(0)| = |g(0)| = 1$, then $|g|$ attains its maximum at $z = 0$, and the same argument gives $g \equiv c$ with $|c| = 1$, so $f(z) = cz$.
[/step]