You have 2 independent random variables with pdfs $$f_X(x)=0.25[u(x)-u(x-4)] \quad \text{and} \quad f_Y(y)=e^{-y}u(y).$$
Define new random variable by $$Z= \begin{cases} Y, & X \le 2\\ X, & X >2\end{cases}$$ Calculate: $\mathbb{P}(Z\le2)$.
So here I am stuck and do not know how to proceed, the only hint my lecturer said: using in "Law of total probability",I dont know how to connect the new r/v Z to X Y and . Please help