The only piece of information you need that the question doesn't tell you is:
1 horsepower = 746 watts
So 340 horsepower = 253,640 watts
-- The output of the engine is 253.640 kW useful energy and 900 kW waste heat.
-- The engine is using 1,153.640 kW total energy.
-- The useful output is 253.640 kW.
-- Efficiency is (253.640 kW) / (1,153.640 kW)
Efficiency = 21.99 %