Call $q$ the probability to get a tail, hence $q$ solves $2q(1-q)=1-p$. Let $X_n$ denote the length of the run of consecutive tails just before time $n$ and $T_k=\inf\{n\geqslant0\mid X_n=k\}$.
Your first question is asking for the probability of $[T_3\leqslant n]$. Note that $(X_n)_{n\geqslant0}$ is a Markov chain on $\{0,1,2,\ldots\}$, starting from $X_0=0$, with transition probabilities $p_{k,k+1}=q$ and $p_{k,0}=r$ with $r=1-q$.
The usual method to compute the distribution of $T_3$ applies. Call $t_k=\mathrm E_k(s^{T_3})$ for every $k\leqslant3$ and for a given $|s|\leqslant1$. Thus, one is interested in $t_0$ and one knows that $t_3=1$ and that, for every $k$ in $\{0,1,2\}$, $t_k=s(qt_{k+1}+rt_0)$.
This reads $t_0=qst_1+rst_0$, $t_1=qst_2+rst_0$ and $t_2=qs+rst_0$, hence $t_1=qs(qs+rst_0)+rst_0$ and $t_0=qs(qs(qs+rst_0)+rst_0)+rst_0$, that is, $ t_0=\frac{q^3s^3}{1-rs-qrs^2-q^2rs^3}. $ Introducing the three roots $s_1$, $s_2$ and $s_3$ of the polynomial $1-rs-qrs^2-q^2rs^3$, one gets for some coefficients $a_i$ that $ t_0=q^3s^3\sum_{i=1}^3\frac{a_i}{1-s/s_i}=q^3s^3\sum_{i=1}^3a_i\sum_{n\geqslant0}s^n/s_i^n, $ hence, by identification, $ \mathrm P(T_3=n+3)=q^3\sum_{i=1}^3a_i/s_i^{n}, $ and finally, $ \mathrm P(T_3\leqslant n+3)=q^3\sum_{i=1}^3\frac{a_i}{s_i-1}(1-1/s_i^{n+1}). $