The maximum possible efficiency, i.e the efficiency of a Carnot engine , is give by the ratio of the absolute temperatures of hot and cold reservoir.
η_max = 1 - (T_c/T_h)
For this engine:
η_max = 1 - [ (20 +273)K/(600 + 273)K ] = 0.66 = 66%
The actual efficiency of the engine is 30%, i.e.
η = 0.3 ∙ 0.664 = 0.20 = 20 %
On the other hand thermal efficiency is defined as the ratio of work done to the amount of heat absorbed from hot reservoir:
η = W/Q_h
So the heat required from hot reservoir is:
Q_h = W/η = 1000J / 0.20 = 5000J