Answer
Let T as the cord's force.
Applying Newton's Second Law, we have:
Net force = $T-mg=ma$.
Then
$$T=m(a+g)$$
Because of $a=-\frac{g}{4}$
$$T=m(a+g)=m(-\frac{g}{4}+g)=m\frac{3g}{4}$$
By definition, $W=Fdcos\theta$.
The angle between $T$ and displacement $d$ is $180^{\circ}$, thus
$$W_{T}=Tdcos\theta=-m\frac{3g}{4}d$$
is the work done on the block by the cord.
Work Step by Step
Let the cord's force be F.
Block's acceleration $=\frac{g}{4}$
Net force = $Ma=M\frac{g}{4}$
Block is going down so, weight($Mg$) is greater. Therefore;
$Mg-F = M\frac{g}{4}$
$F = \frac{-3Mg}{4}$
Substituting the formula of $F$ above in $W=Fd$ and simplifying:
$W=Fd=\frac{-3Mg}{4}\times d =\frac{-3Mgd}{4}$