Answer
See the detailed answer below.
Work Step by Step
From the given figure, it is obvious that,
$\bullet$ $T_{H1}=600$ K
$\bullet$ $T_{C1}=300$ K
$\bullet$ $T_{H2}=500$ K
$\bullet$ $T_{C2}=400$ K
$\bullet$ $Q_{H1}=Q_1=1000$ J
$\bullet$ $Q_{C1}=Q_2$
$\bullet$ $Q_{H2}=Q_3$
$\bullet$ $Q_{C2}=Q_4$
---
a)
$$Q_1=\color{red}{\bf 1000}\;\rm J$$
And we can find $Q_2$ by using the thermal efficiency of a Carnot engine which is given by
$$\eta_1=\dfrac{W_{out}}{ Q_{H1}}=\dfrac{Q_{H1}-Q_{C1}}{Q_{H1}}=1-\dfrac{ Q_{C1}}{Q_{H1}}$$
and it is also given by
$$\eta_1 =1-\dfrac{ T_{C1}}{T_{H1}}$$
Thus,
$$ \dfrac{ T_{C1}}{T_{H1}}=\dfrac{ Q_{C1}}{Q_{H1}}$$
And from the given dots above;
$$ \dfrac{ T_{C1}}{T_{H1}}=\dfrac{ Q_{2}}{Q_{1}}$$
$$Q_2=Q_1\left[\dfrac{ T_{C1}}{T_{H1}}\right]$$
Plugging the known;
$$Q_2=(1000)\left[\dfrac{ 300}{600}\right]$$
$$Q_2=\color{red}{\bf 500}\;\rm J$$
It is obvious that $W_{out}=W_{in}$ where $W_{out}=Q_1-Q_2$
Hence,
$$W_{in}=W_{out}=1000-500=\bf 500\;\rm J$$
Now we know that $W_{in}$ of a Carnot refrigerator is given by the coefficient of performance.
$$K=\dfrac{T_{C2}}{T_{H2}-T_{C2}}=\dfrac{Q_{C2}}{W_{in}}$$
where $Q_{C2}=Q_4$, so
$$Q_4=Q_{C2}= W_{in}\left[\dfrac{T_{C2}}{T_{H2}-T_{C2}}\right]$$
Plugging the known;
$$Q_4= (500)\left[\dfrac{(400)}{(500)-(400)}\right]$$
$$Q_4=\color{red}{\bf 2000}\;\rm J$$
Now we can find $Q_3$ which is $Q_{H2}$,
$$Q_3=Q_{H2}=Q_4+W_{in}=2000+500$$
$$Q_3=\color{red}{\bf 2500}\;\rm J$$
__________________________________________________________
b) As we see from the results above, $Q_1=1000\;\rm J$ while $Q_3=2500\;\rm J$.
Hence,
$$\boxed{Q_3\gt Q_1}$$
__________________________________________________________
c) No, they are not violating the second law since the hot and cold reservoirs are different for the heat engine and the refrigerator.