(1) Find the marginal PMF of X by summing rows:

k012
PX(k).25.5.25

(2) Compute E[X]:

E[X]=0(0.25)+1(0.5)+2(0.25)1