Distribution function of stopped Brownian motion 
Suppose $\{B(t); t \geq 0\}$ is a standard Brownian motion, and define the process $\{X(t); t \geq 0\}$ $X(t) = x+B(t)$, where $x>0$ fixed real number. Next define $\tau_0 := \inf \{t \geq 0: X(t) = 0\}$ and using $\tau_0$ define the stochastic process $\{Y(t); t \geq 0\}$ as $Y(t) = X(t), t\leq \tau_0$ and $Y(t)=0$ otherwise. Compute for $t>0 $ the probability density function of $Y(t)$.
Hint: observe that for each $t>0, y>0$, $$P(Y(t)>y)= P(X(t)>y, \tau_0>t).$$

I started solving this problem on my own, however, I am not sure how to continue. I would be grateful for any help!
Solution: Note that $\tau_0 = inf\{B(t)=-x\} =: \tau_{-x}^{B}$ and recall that $\tau_{-x}^{B} = \tau_{x}^{B}$. Then, $P(Y(t)> y) = P(X(t)>y, \tau_0>t) = P(B(t) > y-x, \tau_{x}^{B}>t)= P(B(t)>y-x)P(\tau_{x}^{B})$.
 A: By definition, $Y_t \geq 0$, and so we it suffices to compute $\mathbb{P}(Y_t>y)$ for $y>0$. Since $Y_t=0$ for $t >\tau_0$ and $Y_t =X_t$ for $t \leq \tau_0$, we have
$$\mathbb{P}(Y_t>y) =\mathbb{P}(Y_t>y, \tau_0>t)=\mathbb{P}(X_t>y, \tau_0>t).$$
If we set $m_t = \inf_{s \leq t} B_s$, then we can write this equivalently as
$$\mathbb{P}(Y_t>y) = \mathbb{P}(x+B_t>y, m_t>-x) = \mathbb{P}(B_t>y-x,m_t>-x).$$
This identity is useful because the joint law of $(B_t,m_t)$ can be calculated explicitly, e.g. using Lévy's triple law (see, for instance, Chapter 6 in the Brownian motion book by Schilling & Partzsch).

Theorem: For $t>0$ the distribution of $(m_t,B_t)$ has a density with respect to Lebesgue measure; it is given by $$p_{m_t,B_t}(u,v) = - 2 \frac{2u-v}{\sqrt{2\pi t^3}} \exp \left( - \frac{(2u-v)^2}{2t} \right) 1_{\{u \leq 0\}} 1_{\{u \leq v\}} .$$

Applying this theorem, we get
\begin{align*} \mathbb{P}(Y_t>y) &= - \frac{2}{\sqrt{2\pi t^3}}\int_{y-x}^{\infty}  \int_{-x}^{\min\{0,v\}} (2u-v) \exp \left(- \frac{(2u-v)^2}{2t} \right) \, du \, dv \\ =: I_1+I_2 \end{align*}
where
\begin{align*} I_1 &:= - \frac{2}{\sqrt{2\pi t^3}}\int_{y-x}^0  \int_{-x}^{v} (2u-v) \exp \left(- \frac{(2u-v)^2}{2t} \right) \, du \, dv \\ I_2 &:= - \frac{2}{\sqrt{2\pi t^3}}\int_{0}^{\infty}  \int_{-x}^{0} (2u-v) \exp \left(- \frac{(2u-v)^2}{2t} \right) \, du \, dv. \end{align*}
Since
\begin{align*}
I_1 &= - \frac{2}{\sqrt{2\pi t^3}}\int_{y-x}^0 \left[ -\frac{t}{2} \exp \left( - \frac{(2u-v)^2}{2t} \right) \right]_{u=-x}^v \,dv \\ &= \frac{1}{\sqrt{2\pi t}} \int_{y-x}^0 \left[ \exp \left(-\frac{v^2}{2t} \right) - \exp \left(- \frac{(2x+v)^2}{2t} \right) \right] \, dv \end{align*}
and
\begin{align*}
I_2 &= - \frac{2}{\sqrt{2\pi t^3}}\int_{0}^{\infty} \left[ -\frac{t}{2} \exp \left( - \frac{(2u-v)^2}{2t} \right) \right]_{u=-x}^0 \,dv\\ &= \frac{1}{\sqrt{2\pi t}} \int_{0}^{\infty} \left[\exp \left(-\frac{v^2}{2t} \right) - \exp \left(- \frac{(2x+v)^2}{2t} \right) \right] \, dv \end{align*}
we obtain that
\begin{align*}
\mathbb{P}(Y_t>y) &= \frac{1}{\sqrt{2\pi t}} \int_{y-x}^{\infty} \left[\exp \left(-\frac{v^2}{2t} \right) - \exp \left(- \frac{(2x+v)^2}{2t} \right) \right] \, dv \\ &= \frac{1}{\sqrt{2\pi t}} \int_{y-x}^{y+x} \exp \left(-\frac{v^2}{2t} \right) \, dv \\ &= \mathbb{P}(y-x<B_t <y+x) . \end{align*}
If we denote by $\Phi$ the common distribution function of the standard Gaussian distribution, we can write this equivalently as
$$\mathbb{P}(Y_t>y) = \Phi \left( \frac{y+x}{\sqrt{t}} \right)- \Phi \left( \frac{y-x}{\sqrt{t}} \right).$$
