Calculate the measure of segment AB in triangle rectangle ABC For reference:
Given the triangle $ABC$, straight at $B$. The perpendicular bisector of $AC$ intersects at $P$
with the angle bisector of the outer angle $B$, then $AF \parallel BP$  ($F\in BC$) is drawn.
If $FC$ = $a$, calculate BP(x). (Answer: $\frac{a\sqrt2}{2})$

My progress:

Point P is on the circumcircle of ABC because the angle $\measuredangle ABP = 135^o$
$ Where~ AC = 2R\\
\triangle CBP \rightarrow
PC^2 = BP^2 + BC^2 - \sqrt2BCBP\\
but~PC = PA = R\sqrt{2} \text{(since P is in the bisector AC)}\\
2R^2 = BP^2 +BC^2 - \sqrt{2}BCBP\\
0= BP^2 - \sqrt{2}BCBP + BC^2 - 2R^2\\
0= (BP - \frac1{ \sqrt{2}}BC)^2 + \frac{BC^2}2 - 2R^2\\
0= (BP - \frac1{ \sqrt{2}}BC)^2 + \frac{BC^2-4R^2}2\\
0= (BP - \frac1{ \sqrt{2}}BC)^2 - \frac{AB^2}2\\
$
I can't find the relationship between BC, AB and a...
If anyone finds another way to solve by geometry I would be grateful

An uglier brute-force method by some trigonometric identities:

Let the green marked $\angle BCA$ be $\theta$. Then the corresponding angle at centre $\angle BEA = 2\theta$, and $\angle PEB = 90^\circ - 2\theta$.
By the laws of cosine,
$$\begin{align*}
BP^2 &= EB^2 + EP^2 - 2 EB\cdot EP \cos \angle PEB\\
&= 2R^2 - 2 R^2 \cos (90^\circ - 2\theta)\\
&= 2R^2 - 2R^2\sin 2\theta\\
&= 2R^2\left(\sin^2\theta -2\sin\theta\cos\theta +\cos^2\theta\right)\\
&= \frac12 (2R)^2\left(\cos\theta-\sin\theta\right)^2\\
&= \frac12 \left[(BF+a)-AB\right]^2\\
&= \frac{a^2}{2} & (AB=BF)\\
x = BP &= \frac{a}{\sqrt2}
\end{align*}$$
