  At young ages, when radiation from the host star is high, and the planet is
hot and inflated after formation, planetary atmospheric mass loss can be
extremely strong compared to older planets. In turn, stellar winds are faster
and denser for young stars compared to evolved main-sequence stars. Their
interaction with escaping planetary atmospheres can substantially affect
atmospheric mass loss rates, as well as the observable signatures of escaping
atmospheres, with both effects expected to occur differently for young and
evolved planets. We perform a comparative study of two systems around stars of
similar masses but very different ages (50~Myr and 9~Gyr): TOI-942 and TOI-421.
Both stars host two sub-Neptune-like planets at similar orbits and in similar
mass ranges, which allows a direct comparison of the atmospheric escape and
interactions with the stellar winds in the young and old systems. We perform
the 3D atmospheric modeling of the four planets in TOI-942 and TOI-421 systems
and make the theoretical predictions of possible observational signatures in
Ly-alpha absorption. We find that accounting for the stellar wind interacting
with planetary atmospheres is crucial for the interpretation of the
observations for young planets. Additionally, we show that a particular energy
distribution along the XUV spectra has a minor effect on the atmospheric
mass-loss rates, but it is of crucial importance for modeling the Ly-alpha
absorption and therefore for interpretation of observations.
