If $B(t),t\ge0$ is a standard Brownian motion with initial condition $B(0)=0$ and $a>0$, let $Y(t)=B(t)$ when $\max\limits_{0\le s \le t}B(s)<a$ and $Y(t)=a$ otherwise. Find the distribution function of $Y(t)$.
Let $M(t)=maxB(s)$.
Here I am confused if the question is asking me to find $F_Y(t)=P\{Y(t)\le y\}$ or $F_Y(t)=P\{Y(t)=B(t)|M(t)<a\}$ or $F_Y(t)=P\{M(t)<a|Y(t)=B(t)\}$ or something else related to Bayes equation.
Consider the stopping time $T=\inf\lbrace t\geq 0 | B_t=a \rbrace$. Now find out how this stopping time is related to $\max_{0\leq s\leq t} B_s$ and write $Y_t$ as a stopped process. You are asked to determine the distribution of this stopped process I think.