Answer
(a) $19.7KJ$
(b) $54.2KJ$
Work Step by Step
(a) We know that
$COP=\frac{Q_c}{W}$
We plug in the known values to obtain:
$1.75=\frac{3.45\times 10^4}{W}$
$\implies W=1.97\times 10^4J=19.7KJ$
(b) As $Heat \space exhausted=Q_h=Q_c+W$
We plug in the known values to obtain:
$Q_h=3.45\times 10^4+1.97\times 10^4=5.42\times 10^4J=54.2KJ$