The Spanish aliento (“breath”) comes from the Latin for anhelitus (“panting; exhalting”) which itself comes from the older Latin anhelo (“difficulty breathing”). Anhelo, in turn, comes from halo (even older Latin for breath), prefixed with the negative an- prefix and from halo which we get (via French) the English inhale and exhale.
But what’s confusing here is the Latin anhelitus transforming into the Spanish aliento . The easy way to see it is to remember that: most solo h- in Latin became silent in Spanish and then eventually, disappeared. (When ‘h’ does remain in Spanish, it is still silent!). So, (h)-l of aliento maps to the (in)-h-l of inhale and similarly (ex)-h-l of exhale.