The solution of the equation $$y'(t)+\frac 23 y(t)=1-\frac 12 t$$ with the condition $y(0)=a$ is $$y(t)=\frac{1}{8} \left((8 a-21) e^{-2 t/3}-6 t+21\right)$$ The derivative is then $$y'(t)=\frac{1}{12} \left((21-8 a) e^{-2 t/3}-9\right)$$ and this derivative cancels at $$t^*=\frac{3}{2} \log \left(\frac{7}{3}-\frac{8 a}{9}\right)$$ and $$y(t^*)=\frac{3}{2}-\frac{9}{8} \log \left(\frac{7}{3}-\frac{8 a}{9}\right)$$ Similarly, the second derivative $$y''(t^*)=-\frac{1}{2}$$ shows that the point is a maximum. So, in order for the solution to touch the $t$ axis without crossing it, what is required is $$\frac{3}{2}-\frac{9}{8} \log \left(\frac{7}{3}-\frac{8 a}{9}\right)=0$$
I am sure that you can easily take from here.
Edit
Since there is a difference between the equations in the title and in the text, let us do the same for $$y'(t)+\frac 23 y(t)=1-k t$$ with the condition $y(0)=a$. What is obtained is then $$y(t)= \frac{1}{4} \left(e^{-2 t/3} (4 a-9 k-6)+k (9-6 t)+6\right)$$ $$y'(t)=\frac{1}{6} \left(e^{-2 t/3} (-4 a+9 k+6)-9 k\right)$$ and the derivative cancel at $$t^*=\frac{3}{2} \log \left(\frac{-4 a+9 k+6}{9 k}\right)$$ for which $$y(t^*)=\frac{3}{2}-\frac{9}{4} k \log \left(\frac{-4 a+9 k+6}{9 k}\right)$$ $$y''(t^*)=-k$$ So, if $k>0$, the point corresponds to a maximum and we then need to solve for $a$ $$\frac{3}{2}-\frac{9}{4} k \log \left(\frac{-4 a+9 k+6}{9 k}\right)=0$$ $$a=\frac{1}{4} \left(6-9 \left(e^{\frac{2}{3 k}}-1\right) k\right)$$ So, the value of the maximum is given by $$y(t^*)=0$$