The given quadrilateral (call it Q) is a trapezoid with "base" lengths of 6 and 12, and "height" 2, so its area is (6 + 12)/2*2 = 18. This means the joint density is

where Q is the set of points

(y = 12 - 3x is the equation of the line through the points (0, 12) and (2, 6))
Recall the definition of expectation:
![E[g(X,Y)]=\displaystyle\int_(-\infty)^\infty\int_(-\infty)^\infty g(x,y)f_(X,Y)(x,y)\,\mathrm dx\,\mathrm dy](https://img.qammunity.org/2021/formulas/mathematics/college/72d07l5mqadphdqszkozuo9s4r7pru6x67.png)
(a) Using the definition above, we have
![E[X]=\displaystyle\int_(-\infty)^\infty\int_(-\infty)^\infty xf_(X,Y)(x,y)\,\mathrm dx\,\mathrm dy=\int_0^2\int_0^(12-3x)\frac x{18}\,\mathrm dy\,\mathrm dx=\frac89](https://img.qammunity.org/2021/formulas/mathematics/college/bzmishkntztu2e9a05hsoampgt8d2ehxrp.png)
(b) Likewise,
![E[Y]=\displaystyle\int_(-\infty)^\infty\int_(-\infty)^\ifnty yf_(X,Y)(x,y)\,\mathrm dx\,\mathrm dy=\int_0^2\int_0^(12-3x)\frac y{18}\,\mathrm dy\,\mathrm dx=\frac{14}3](https://img.qammunity.org/2021/formulas/mathematics/college/h2mulrxm46ki3s5v3fuhsrcepkc401758t.png)