a hairdryer turns 250J of electrical energy into 50J of heated air. how efficient is this machine and how much is wasted to sound?

The efficiency for heatng air is 50/250 = 20%

However, there is no way of saying how much of the rest goes to sound. Probably not much. Most goes into heating the hot resistor coils inside the device, conductive heat loss, fan motor friction, air kinetic energy, and heat radiation.

The person who assigned that question should know that.