The motor is 40% efficient.
The energy required is 240 000 J. This can not be negotiated, it must be supplied by the motor.
But the motor would supply more than that amount, to be able to do a work of 240 000 J, because it is not 100% efficient.
Efficiency = Work Output / Work Input. , E= 40% = 0.40
The required work output is the do the 240 000 J of work.
0.40 = 240 000 / Wi
Wi = 240 000 / 0.40 = 600 000 J.
That is the input energy into the motor. So amount wasted = 600 000 - 240 000
= 360 000 J. Usually as heat.
That's it. Cheers.