PDF of maximum of two random variables X and Y have joint PDF
$$\ f_{X,Y}(x,y) =\begin{cases}
        1/15 & 0\le x \le 5, & 0 \le y \le 3 \\
       0 & \text{otherwise.} \\
        \end{cases}
$$
Find the PDF of $W = max(X,Y)$.
I try to solve this but I do not know the answer
please check my solution.
CDF :
$$\ P(W \le w) = \begin{cases}
   1  & 4 \le w \le 5\\
   w/3 & 1 \le w \le 3\\
   0  &  w \le 0 \end{cases}$$
PDF :
$$\ P(W \le w) = \begin{cases}
   0  & 4 \le w \le 5\\
   1/3 & 1 \le w \le 3\\
   0  &  w \le 0 \end{cases}$$
 A: Since we can write the joint density $f_{X,Y}$ in the form $f_Xf_Y$ where $f_X = \frac15\sf 1_{[0,5]}$ and $f_Y=\frac13\sf1_{[0,3]}$, it follows that $X$ and $Y$ are independent and $X\sim\sf U(0,5)$, $Y\sim\sf U(0,3)$. If $W=X\vee Y$ then for any $w\geqslant 0$, $$\{W\leqslant w\}=\{X\leqslant w\}\cap\{Y\leqslant w\}, $$
so by independence,
\begin{align}
F_W(w):&=\mathbb P(W\leqslant w)\\
&= \mathbb P(\{X\leqslant w\}\cap\{Y\leqslant w\})\\
&= \mathbb P(X\leqslant w)\mathbb P(Y\leqslant w)\\
&= F_X(w)F_Y(w).
\end{align}
Differentiating, we have the density of $W$ as
\begin{align}
f_W(w) &= \frac{\sf d}{\sf dw}F_W(w)\\ 
&= f_X(w)F_Y(w) + F_X(w)f_Y(w)\\
&= \frac15\sf 1_{[0,5]}(w)\left(\int_0^{w\wedge 3}f_Y(y)\ \mathsf dy\right) + \left(\int_0^{w\wedge 5} f_X(x)\ \sf dx \right)\frac13\sf 1_{[0,3]}(w)\\
&= \frac15\sf 1_{[0,5]}(w)\left(\frac{(w\wedge 3)}{3}\right) +\left(\frac{w\wedge 5}5 \right)\frac13\sf 1_{[0,3]}(w)\\
&= \frac2{15}w\sf 1_{[0,3]}(w) + \frac15\sf 1_{[3,5]}(w).
\end{align}
