I have a region in a 3-D space with a density of $$ \ f_{x,y,z}(X,Y,Z) = \begin{cases} 1 & \text{if $ (x,y,z)\in W$}; \\ 0 & \text{if $(x,y,z)\notin W$};\\ \end{cases} \ $$
Being $W$ the set of points inside the pyramid $(0,0,0)$, $(2,0,0)$,$(0,3,0)$ and $(0,0,1)$
Im asked to find $P\{|X-Y|\leq \frac{1}{2}\}$
For doing so I know the point $x=(2,0,0)$ and the line from this point to $(0,3,0)$ which is $y=\frac{-3}{2}x+3$. So and aproach to $|X-Y|$ would be $2 -(\frac{-3}{2}x+3)=\frac{3}{2}x-1$
And then $3 \int_{0}^{1/2} (\frac{3}{2}x-1)dx $?