How much work is done to move a 6kg Christmas cake from the bottom shelf to.the refrigerator ( 0.5m high) to the top shelf (1.5m high)

The height change is

H = 1.5 - 0.5 = 1.0 m

The work required is
W = M g H