No, HIV does not die when it comes into contact with air. That is a misconception. The CDC commissioned a study several years ago that showed that HIV can survive in the air if the temperature is normal and there is enough air moisture.
It’s one of the reasons that labs are cautious and lab workers where special respiratory devices to avoid any exposure. HIV is not an airborne-disease because it didn’t evolve to spread outside of the body, but in some conditions it can survive (but not replicate) in the air.
The reason that mosquitoes can’t spread the virus is that it is destroyed very quickly inside of a mosquito, owing partly to the temperature of the insect and partly to the inability to replicate in a mosquito’s system.
A mosquito doesn’t inject another person’s blood when they bite you. They inject saliva. The HIV cannot live in a mosquito’s saliva the same way that other diseases can. So, while malaria is transmitted by the saliva of the mosquito (because, unlike HIV it can replicate in the mosquito’s system), HIV never enters into the saliva and therefore cannot be transmitted.