https://www.iatatravelcentre.com/world.php -> United States indicates:
- Passengers entering or transiting through the USA must have a negative COVID-19 test taken at most 3 days before departure from the first embarkation point. Tests accepted are: antigen, NAAT, RT-LAMP, RT-PCR or TMA. Passengers details (e.g., name and date of birth) in the certificate must match those stated in the passport or other travel document; and the test result must specify "negative" or "not detected". If marked "invalid" it is not accepted.
If one takes the flight: airport XXX (not in the US) -> airport YYY (not in the US) -> airport ZZZ (in the US), with a layover at YYY during which one left the airport and reentered it, does airport XXX or airport YYY count as the first embarkation point? The purpose of defining the first embarkation point is satisfying the covid-19 requirements.
Assume that:
- airport XXX and airport YYY are in 2 different countries,
- the layover at airport YYY lasts less than 24 hours,
- the flight XXX ->YYY->ZZZ is on a single ticket,
- no checked baggage will be retrieved and re-checked at airport YYY: all baggage are checked at airport XXX through to the final destination (airport ZZZ),
in case this changes the answer.