There is two different issues, car is over heating and AC throwing hot air.
If AC always throwing hot air: Check AC gas leak, fix it and then top up gas.
If AC throw hot air when overheating: Its normal as thats the way car has been design to remove AC load (45%) from engine when its overheating. In that case check AC fan, engine fan, coolant and coolant leak, water pump to diagnose why its heating up and get it fixed.