By Carnot's ideal heat engine
$\eta=1-\frac{T_{2}}{T_{1}}$
where $\eta_{1}=0.2, \eta_{2}=0.4$
For the first condition
$\eta_{1} =1-\frac{T_{2}}{T_{1}} $
$0.2 =1-\frac{T_{2}}{T_{1}}$
or $0.2=\frac{T_{1}-T_{2}}{T_{1}}\,...(i)$
For the second condition
$\eta_{2}=1-\frac{T_{2}-50}{T_{1}}$
$0.4=\frac{T_{1}-\left(T_{2}-50\right)}{T_{1}}$
$0.4=\frac{T_{1}-T_{2}+50}{T_{1}}$
$0.4=\frac{T_{1}-T_{2}}{T_{1}}+\frac{50}{T_{1}}$
$0.4=0.2+\frac{50}{T_{1}}$ [From E(i)]
$0.4-0.2=\frac{50}{T_{1}}$
$T_{1}=\frac{50}{0.2}$
$T_{1}=250\, K$
Putting the value of $T_{1}$ in E (i), we get
$0.2=\frac{T_{1}-T_{2}}{T_{1}}$
$T_{2} =T_{1}-0.2 T_{1} $
$T_{2} =250-0.2 \times 250$
$T_{2} =250-50 $
$T_{2} =200\, K $
So $T_{1} =250 \,K , T_{2}=200\, K $