Random vector (X,Y) has uniform distribution on the square
\(G = \left \{ (x,y) : 0\leq x \leq 2, 0 \leq y \leq 2 \right \}\).
Find the density function \(f{z}\) of a random variable
\(Z = max\left \{X, Y+1 \right \}\).