G = max (Z,Y) were f(Z,Y) = 1/15 0 <Z< 3 and 0<Y<5.
0 <g<3
integrating 0 to w for both variables = g^2 /15

3 <g<5
integrate 0 to 3 for x and 0 to w for y I get g/5

I got 2g/15 for 0 <g<3 and 1/5 for 3 < g < 5 and 0 o.w.