The complex analysis problem I came up with is the following:
Let $\mathbb{D}=\{z\in \mathbb{C} : |z|<1\}$ be the open unit disk and $f:\mathbb{D} \to \mathbb{D}$ be a holomorphic function such that $f(1/2)=f(-1/2)=0.$
Prove that $|f(0)|\leq 1/3.$
The proof is quite straightforward, if you know the Schwarz lemma's one: consider $g(z):=\frac{f(z)}{(z-1/2)(z+1/2)}.$ For every $z\in B_r=\{z\in \mathbb{C} : |z|<r\},$ by the maximum principle we have that $|g(z)|\leq \sup_{|z|=r}\frac{1}{|z-1/2||z+1/2|}.$ Letting $r\to 1$ we have that the $\sup_{|z|=1}\frac{1}{|z-1/2||z+1/2|}=4/3,$ reached in $z=\pm 1.$
Now, if I substitute $|g(0)|=|\frac{f(0)}{1/2\cdot (-1/2)}|\leq 4/3,$ I come up with the thesis: $|f(0)| \leq 4/3 \cdot 1/4=1/3.$
The question now is: is this bound optimal?
The answer should be no: if I suppose that $|f(0)|=1/3,$ then I would obtain $|g(0)|=4/3,$ so by the maximum principle it is constant ($|g(z)|\leq 4/3$ everywhere and it has maximum in $0,$ which does not belong to the boundary).
This means that $f(z)=c(z-1/2)(z+1/2),$ where $c\in \mathbb{C}.$ What's the upper bound for $|c|?$ It is $\frac{1}{sup_{z\in \mathbb{D}}|z-1/2||z+1/2|}= \frac{1}{5/4}=4/5,$ because $f$ must have its image in $\mathbb{D},$ in $|f(i)|=5/4.$
We conclude that, if we assume $|f(0)|=1/3,$ then $|f(0)| \leq 4/5|1/2||-1/2|=1/5<1/3,$ which leads to a contradiction.
So, now that I know that the bound is not optimal, I ask myself which is the optimal one. I can't say that it is $1/5,$ because I've derived it from the assumption $|f(0)|=1/3,$ and if I suppose $|f(0)|=1/3-\varepsilon,$ I can't use the maximum principle on $g,$ because of the rigidity of its hypotheses; so it can happen that the bound is still $1/3,$ but just with the strict inequality: $|f(0)|<1/3.$
I'm pretty stuck at this point. Any help is really appreciated.
I seriously doubt that your bound is optimal. While your proof is maybe correct it's the "wrong" proof - you want to divide $f$ by a function that vanishes at $\pm1/2$ and which has modulus $1$ on the boundary.
As usual, if $|\alpha|<1$ define $$\phi_\alpha(z)=\frac{z-\alpha}{1-\overline\alpha z}.$$Note that $|\phi_\alpha(z)|=1$ if $|z|=1$. Define $$g(z)=\frac{f(z)}{\phi_{1/2}(z)\phi_{-1/2}(z)}$$and apply the same argument; you should get a better bound.
And I suspect that you can show the better bound is optimal by considering the case $f=\phi_{1/2}\phi_{-1/2}$.