For reference: In the right triangle $ABC$, right at $B$, the corner $AF$ is drawn such that $AB = FC$ and $\angle ACB = 2 \angle BAF$. Calculate $\angle BAC$.
My progress:
$\triangle ABF: cos(\frac{C}{2}) = \frac{x}{AF}\\ AF^2 = x^2+BF^2\\ \triangle AFC: Law ~of~ cosines:\\ AF^2 = x^2+AC^2-2.x.AC.cosC\\ \triangle ABC:\\ cos C = \frac{BC}{AC} =\frac{x+BC}{AC}\\ x^2+(x+BF)^2 = AC^2\\ Th.Stewart \triangle ABC:\\ AC^2.BF+x^3=AF^2BC+BC.x.BF$
...??

Here is a construction that makes things simple. Extend $CB$ such that $BE = BF = y$
Now $ \displaystyle \angle BAE = \frac{\angle C}{2} \implies \angle CAE = 90^0 - \frac{\angle C}{2}$
And we notice that $\triangle ACE$ is isosceles so $AC = x + 2y$
Applying Pythagoras in $\triangle ABC$,
$(x+2y)^2 = x^2 + (x+y)^2$
$4y^2 = x^2 + y^2 - 2xy = (x-y)^2$
That leads to $x = 3y$ and sides of $\triangle ABC$ are in the ratio $3:4:5$