How can I install macOS to an internal HD on a different Mac?
You don't mention which versions of the Macbook Pro and Macbook Air you have, but, with more recent (last 5 years or so), you can do an over-the-air restore.

Steps:


Shutdown her Macbook Air.
Power up the Macbook Air and immediately press the following key combinations: Command + Option + R. Keep on holding the key combination until you see a spinning globe. You will be asked to connect to your WiFi network so please do so when prompted.
Once you boot into recovery, simply use the Disk Utility to wipe off your main HDD or SSD, go back to the main screen and click on Reinstall macOS on the drive you just wiped. It’s that simple.


This can be a slow process, as it's downloading the OS installer over wifi.

The official Apple support doc.