See attachment for figure.
Hello,
Consider the line from A to the y-axis. Its length is $\displaystyle \pi a$
It is also equal to $\displaystyle x+s+AP$
But $\displaystyle x=a(t-sin(t))$
So we have $\displaystyle \pi a=a(t-\sin(t))+s+AP \Leftrightarrow \boxed{s=\pi a-a(t-\sin(t))-AP}$
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 :
$\displaystyle \sin(\pi-t)=\frac{AP}{a}$
by simple trigonometry, $\displaystyle \sin(\pi-t)=\sin(t)$
Hence $\displaystyle \boxed{AP=a \sin(t)}$
Finally :
$\displaystyle \begin{aligned}
s&=\pi a-a(t-\sin(t))-AP \\
&=\pi a-at+a \sin(t)-a \sin(t) \\
&=\boxed{a(\pi-t)} \end{aligned}$