Hello,

Consider the line from A to the y-axis. Its length is

It is also equal to

But

So we have

Consider the triangle ABP. It's a right angle triangle.

Length of BP is a.

Angle ABP is pi-t.

So since sin(ABP)=AP/BP, we get :

by simple trigonometry,

Hence

Finally :