Our apt. building has the heater and ac air intake outside (collecting air from our driveway) in stead of coming from inside. is this legal?
Yes it is actually required for the combustion air. As for as the make up air or fresh air intake most newer homes do need them because the homes are sealed so tight that the build up of Co2 inside (from breathing) can reach unhealthy levels.
As far as the location that is not as tightly regulated so the person installing the system puts them as close to the system as possible to save $.
I question whether your HVAC is taking outside air for the input to the inside conditioned air. This is not the usual arrangement for a residence. Residences normally use entirely recirculated air.
Automobile HVAC systems do allow the option of either outside air or recirculation, but home systems, usually do not.
For one thing, a single pass through a home system lowers the temperature of recirculated air by about 15 deg F. So if the outside temp was 100 F and 100 % outside air was input to the air handler, then the output air from the ducts would be 85 F. But in fact the air coming out of the ducts is about 58 F, with the thermostat set at 73 F.
Any air intake you see for air associated with your HVAC would probably be combustion air for a gas furnace or gas fireplace.
But as pointed out in the comment below, there are some residencal units which do pull in some outside air and mix this into the recirculated air stream through the air handler. The system would designed to give controlled replacement air.