Find the heat transferred to the engine by the reservoirs

Consider a Carnot cycle operating between ${ T}{ 1 }$ = 500 K and
${ T}
{ 2 }$ = 300 K producing 1 kJ of mechanical work per cycle. Find the heat transferred to the engine by the reservoirs.