I have 2 points $B$ and $P$ and need to calculate angle $\alpha$ (maybe also I will need point $C$ and $E$)

How can I do this. I know that I can calculate point $D$ it's $(\frac{1}{2}(x_P-x_B), \frac{1}{2}(y_P-y_B))$ then calculate line that it's perpendicular to $PB$ and that go through $D$ and then intercections with lines $x=x_B$ and $y=y_B$, if I have point $E$ I can calculate angle from triangle $PDE$, but need exact formula to do this.
First, assume $B=(0,0)$ (by translation). $A$ seems irrelevant to me, but if we have $C$, by symmetry the angle $$90^\circ - \angle EBD = \angle CEB = \alpha$$ $$\angle EBD = \arccos(y_D/|\overline{BD}|)= \arccos(y_P/|\overline{PB}|)$$ and finally we have $$\alpha = \arcsin\left(\frac{x_P}{\sqrt{x_P^2+y_P^2}}\right)$$ Translating back, we get $$\alpha = \arcsin\left(\frac{x_P-x_B}{\sqrt{(x_P-x_B)^2 + (y_P-y_B)^2}}\right)$$