Answer
(a) W = 30 J
(b) W = 0
Work Step by Step
(a) We can find the work done by the tension;
$W = F\cdot d$
$W = F ~d~cos(\theta)$
$W = (15~N)(2.0~m)~cos(0^{\circ})$
$W = 30~J$
(b) We can find the work done by gravity;
$W = F\cdot d$
$W = F ~d~cos(\theta)$
$W = F~d~cos(90^{\circ})$
$W = F~d~(0)$
$W = 0$