Let $X$ be an exponential distributed random variable with $\lambda =2$ and $Y$ the random variable that takes the maximum of $X$ and $3$. What is the distribution function of $Y$?
So how can I calculate $P(Y\leq y) = P(\max\{X,3\} \leq y) = P(3\leq y, X < 3) + P(3\leq X \leq y)$, since I think $X,Y$ are not independent?
$P(X < 3) = 1-e^{-6}$ and $ P(3 \leq X) = e^{-6}$ are easy but what about the $y$?
It is a mixed random variable, because when $X<3$, that is with a probability of $1-e^{-6}$, Y is discrete =3. for the rest, Y has the same distribution of X.
$$F_Y(y) = \begin{cases} 0, & \text{if $y<3$} \\ 1-e^{-6}, & \text{if $y=3$} \\ 1-e^{-2y}, & \text{if $y>3$ } \end{cases}$$
As you can see, the $CDF_Y$ has "a jump" in $Y=3$ that is the law is discrete there. You can easily understand this with a drawing. Observe that I got the CDF of Y without doing any calculation, but only looking at the drawing...
this is the drawing of the transformation function: the max(X;3) is the red line. As you can see, Y-domain is $[3;\infty)$ and when the X spreads its probability through the interval $(0;3)$ the Y remains 3. That is Y is discrete with a positve mass of probability... for the rest of the interval $X=Y$ in distribution
If you want you can derive also the mixed pdf of Y. Be careful that you cannot calulate the derivative of CDF in Y=3 to get the pdf because it is discrete there...you have to do $F_Y(3)-F_Y(3^-)$