Let $W(t)$ be a standard Brownian motion. Let $y(t)=t$. Define the following stopping time:
$T_h = \inf \{t>0: W(t)=y(t) \}$
What would be the probability:
$$\mathbb{P}(T_h\leq k)$$ for some constant $k>0$?
Now defining $y(t)=t^2$, what would be the probability?
Is there any literature on these types of problems? (I of course know how to compute the probability for the function $y(t)=constant$, but I haven't found any material for non-constant functions).
Hint
On can prove the following proposition
Recall Girsanov theorem
By Girsanov theorem, under the measure $$\mathbb Q(\mathrm d \omega )=\exp\left\{W_t-\frac{1}{2}t\right\}\mathbb P(\mathrm d \omega )$$ the process $$\tilde W_t:=W_t-t,$$ is a Brownian motion. Then
\begin{align*} \mathbb P\{T_h>t\}&=\mathbb P\left\{\sup_{0\leq s\leq t}(W_s-s)<0\right\}\\ &=\mathbb E_{\mathbb Q}\left[\boldsymbol 1_{\left\{\sup_{0\leq s\leq t}\tilde W_s>0\right\}}\exp\left\{-\tilde W_t-\frac{3}{2}t\right\}\right]. \end{align*} where $\mathbb E_{\mathbb Q}$ denote the expectation under the measure $\mathbb Q$. Using \eqref{1} allow you to conclude.
For $y(t)=t^2$, same idea using $$\mathbb Q(\mathrm d \omega )=\exp\left\{2\int_0^ts\,\mathrm d W_s-\frac{2}{3}t^3\right\}\mathbb P(\mathrm d \omega ),$$ and the process $$\tilde W_t=W_t-t^2.$$ But at the end, I'm not so sure that you can find a nice closed form as the previous case.