You can solve this problem using η=N/1+2a also as follows
Transmission time= Frame length/Bandwidth = (512*8)/1024000 = 4msec (as 1Kb data must be taken as 1024 bits) ;
Propagation delay = 40msec (given) ;
a= 40/4= 10msec
N= 7
efficiency =N/(1+2a) = 7/(1+20) =0.33
Throughput=efficiency*bandwidth = 0.33*1024000 = 341.33 Kbps
In the solution you have pasted
they have used the formula as
Efficiency = Amount of data sent/Amount of data that could be sent Efficiency = Amount of data sent / (RTT * Bandwidth)
Throughput=Efficiency *Bandwidth ...as bandwidth is both in numerator and denominator both cancels out