For a reversible heat engine, efficiency is expressed as

1-(T2/T1) = 1- (Q2/Q1)

2 represents sink, where heat is rejected out.

Thus, in the given data, T1=600 K , (Source at higher temperature) T2 = 300 K (sink), heat rejected out , Q2 = 200kJ . So

Efficiency = 1-(0.5) = 0.5 = (Q1-Q2)/Q1. This gives heat input Q1 to be 400 kJ.